toCharArray
Returns a CharArray containing characters of this string.
Since Kotlin
1.4Returns a CharArray containing characters of this string or its substring.
Since Kotlin
1.4Parameters
the beginning (inclusive) of the substring, 0 by default.
the end (exclusive) of the substring, length of this string by default.
Throws
if startIndex is less than zero or endIndex is greater than the length of this string.
if startIndex is greater than endIndex.
Copies characters from this string into the destination character array and returns that array.
Since Kotlin
2.0Parameters
the array to copy to.
the position in the array to copy to.
the start offset (inclusive) of the substring to copy.
the end offset (exclusive) of the substring to copy.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Copies characters from this string builder into the destination character array.
Since Kotlin
1.4Parameters
the array to copy to.
the position in the array to copy to, 0 by default.
the beginning (inclusive) of the range to copy, 0 by default.
the end (exclusive) of the range to copy, length of this string builder by default.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Returns a CharArray containing characters of this string.
Since Kotlin
1.4Returns a CharArray containing characters of this string or its substring.
Since Kotlin
1.4Parameters
the beginning (inclusive) of the substring, 0 by default.
the end (exclusive) of the substring, length of this string by default.
Throws
if startIndex is less than zero or endIndex is greater than the length of this string.
if startIndex is greater than endIndex.
Copies characters from this string into the destination character array and returns that array.
Since Kotlin
2.0Parameters
the array to copy to.
the position in the array to copy to.
the start offset (inclusive) of the substring to copy.
the end offset (exclusive) of the substring to copy.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Copies characters from this string builder into the destination character array.
Since Kotlin
1.4Parameters
the array to copy to.
the position in the array to copy to, 0 by default.
the beginning (inclusive) of the range to copy, 0 by default.
the end (exclusive) of the range to copy, length of this string builder by default.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Returns a CharArray containing characters of this string.
Since Kotlin
1.0Returns a CharArray containing characters of this string or its substring.
Since Kotlin
1.4Parameters
the beginning (inclusive) of the substring, 0 by default.
the end (exclusive) of the substring, length of this string by default.
Throws
if startIndex is less than zero or endIndex is greater than the length of this string.
if startIndex is greater than endIndex.
Copies characters from this string into the destination character array and returns that array.
Since Kotlin
1.0Parameters
the array to copy to.
the position in the array to copy to.
the start offset (inclusive) of the substring to copy.
the end offset (exclusive) of the substring to copy.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Copies characters from this string builder into the destination character array.
Since Kotlin
1.4Parameters
the array to copy to.
the position in the array to copy to, 0 by default.
the beginning (inclusive) of the range to copy, 0 by default.
the end (exclusive) of the range to copy, length of this string builder by default.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Returns a CharArray containing characters of this string.
Since Kotlin
1.3Returns a CharArray containing characters of this string or its substring.
Since Kotlin
1.3Parameters
the beginning (inclusive) of the substring, 0 by default.
the end (exclusive) of the substring, length of this string by default.
Throws
if startIndex is less than zero or endIndex is greater than the length of this string.
if startIndex is greater than endIndex.
Copies characters from this string into the destination character array and returns that array.
Since Kotlin
2.0Parameters
the array to copy to.
the position in the array to copy to.
the start offset (inclusive) of the substring to copy.
the end offset (exclusive) of the substring to copy.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Copies characters from this string builder into the destination character array.
Since Kotlin
1.4Parameters
the array to copy to.
the position in the array to copy to, 0 by default.
the beginning (inclusive) of the range to copy, 0 by default.
the end (exclusive) of the range to copy, length of this string builder by default.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Returns a CharArray containing characters of this string.
Since Kotlin
1.8Returns a CharArray containing characters of this string or its substring.
Since Kotlin
1.8Parameters
the beginning (inclusive) of the substring, 0 by default.
the end (exclusive) of the substring, length of this string by default.
Throws
if startIndex is less than zero or endIndex is greater than the length of this string.
if startIndex is greater than endIndex.
Copies characters from this string into the destination character array and returns that array.
Since Kotlin
2.0Parameters
the array to copy to.
the position in the array to copy to.
the start offset (inclusive) of the substring to copy.
the end offset (exclusive) of the substring to copy.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Copies characters from this string builder into the destination character array.
Since Kotlin
1.8Parameters
the array to copy to.
the position in the array to copy to, 0 by default.
the beginning (inclusive) of the range to copy, 0 by default.
the end (exclusive) of the range to copy, length of this string builder by default.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Returns a CharArray containing characters of this string.
Since Kotlin
1.8Returns a CharArray containing characters of this string or its substring.
Since Kotlin
1.8Parameters
the beginning (inclusive) of the substring, 0 by default.
the end (exclusive) of the substring, length of this string by default.
Throws
if startIndex is less than zero or endIndex is greater than the length of this string.
if startIndex is greater than endIndex.
Copies characters from this string into the destination character array and returns that array.
Since Kotlin
2.0Parameters
the array to copy to.
the position in the array to copy to.
the start offset (inclusive) of the substring to copy.
the end offset (exclusive) of the substring to copy.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.
Copies characters from this string builder into the destination character array.
Since Kotlin
1.8Parameters
the array to copy to.
the position in the array to copy to, 0 by default.
the beginning (inclusive) of the range to copy, 0 by default.
the end (exclusive) of the range to copy, length of this string builder by default.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.