官术网_书友最值得收藏!

Char 

This type is used to represent characters. A character is a unit of information that roughly corresponds to a grapheme, or a grapheme-like unit or symbol. In Kotlin, characters are of the Char type. Characters in single quotes in Kotlin, such as a, $, %, and &, are all examples of characters:

val c: Char = 'i' // I am a character

Recall we mentioned earlier that a string is a sequence of characters:

var c: Char
val sentence: String = "I am made up of characters."

for (character in sentence) {
c = character // Value of character assigned to c without error
println(c)
}
主站蜘蛛池模板: 乌苏市| 新绛县| 东城区| 彭山县| 潞西市| 博乐市| 玉龙| 龙里县| 沧源| 西青区| 福州市| 云浮市| 桃江县| 平塘县| 阳西县| 砀山县| 元江| 金堂县| 应城市| 抚州市| 丰镇市| 天镇县| 石门县| 嘉兴市| 无为县| 绥德县| 嵊泗县| 安庆市| 罗甸县| 大城县| 华亭县| 英山县| 龙江县| 嘉禾县| 长宁县| 神木县| 迁安市| 镇远县| 乌审旗| 邻水| 青铜峡市|