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

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)
}
主站蜘蛛池模板: 福州市| 定结县| 谢通门县| 漳州市| 惠水县| 神池县| 南川市| 云南省| 大港区| 右玉县| 射阳县| 禹城市| 蓬安县| 略阳县| 兴义市| 苍梧县| 松潘县| 新丰县| 娄底市| 清新县| 长沙县| 炎陵县| 长丰县| 石景山区| 高邑县| 贡山| 罗平县| 长治市| 徐闻县| 阜城县| 普格县| 昌图县| 阳春市| 油尖旺区| 台前县| 志丹县| 白山市| 原阳县| 江华| 西乡县| 阿拉尔市|