code
所在位置是kotlin.code
,其相关用法介绍如下。
用法:
返回此 Char 的代码。
一个 Char 的代码是构造它的值,以及与这个 Char 对应的 UTF-16 代码单元。
例子:
<code class="kotlin">import java.util.* import kotlin.test.* fun main(args: Array<String>) { //sampleStart val string = "0Azβ" println(string.map { it.code }) // [48, 65, 122, 946] //sampleEnd }code>
输出:
[48, 65, 122, 946]
相关用法
- Kotlin contentToString用法及代码示例
- Kotlin commonPrefixWith用法及代码示例
- Kotlin containsAll用法及代码示例
- Kotlin copyOf用法及代码示例
- Kotlin component2用法及代码示例
- Kotlin coerceIn用法及代码示例
- Kotlin coerceAtMost用法及代码示例
- Kotlin contains用法及代码示例
- Kotlin coerceAtLeast用法及代码示例
- Kotlin commonSuffixWith用法及代码示例
- Kotlin containsValue用法及代码示例
- Kotlin component1用法及代码示例
- Kotlin contentEquals用法及代码示例
- Kotlin capitalize用法及代码示例
- Kotlin chunkedSequence用法及代码示例
- Kotlin chunked用法及代码示例
- Kotlin associateBy用法及代码示例
- Kotlin all用法及代码示例
- Kotlin map用法及代码示例
- Kotlin filterNot用法及代码示例
- Kotlin reduceRight用法及代码示例
- Kotlin Random.Default用法及代码示例
- Kotlin Byte.inc用法及代码示例
- Kotlin getValue用法及代码示例
- Kotlin Double.dec用法及代码示例
注:本文由纯净天空筛选整理自kotlinlang.org大神的英文原创作品 kotlin.code。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。