kotlin.text.toCharArray

toCharArray

inline fun String.toCharArray(): CharArray

Platform and version requirements: JVM

Returns a new character array containing the characters from this string.

inline fun String.toCharArray(
    destination: CharArray, 
    destinationOffset: Int = 0, 
    startIndex: Int = 0, 
    endIndex: Int = length
): CharArray

Platform and version requirements: JVM

Copies characters from this string into the destination character array and returns that array.

Parameters

destination - the array to copy to.

destinationOffset - the position in the array to copy to.

startIndex - the start offset (inclusive) of the substring to copy.

endIndex - the end offset (exclusive) of the substring to copy.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/to-char-array.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部