String
The String class represents character strings. All string literals in Kotlin programs, such as "abc", are implemented as instances of this class.
Since Kotlin
1.0The String class represents character strings. All string literals in Kotlin programs, such as "abc", are implemented as instances of this class.
Since Kotlin
1.1Constructors
Types
Functions
Returns a string obtained by concatenating this string with the string representation of the given other object.
Returns a new character sequence that is a subsequence of this character sequence, starting at the specified startIndex and ending right before the specified endIndex.
Returns a new character sequence that is a subsequence of this character sequence, starting at the specified startIndex and ending right before the specified endIndex.
Properties
Extensions
Creates a new byte input stream for the string.
Returns the character (Unicode code point) at the specified index.
Returns the character (Unicode code point) before the specified index.
Returns the number of Unicode code points in the specified text range of this String.
Returns true if this string is equal to the contents of the specified CharSequence, false otherwise.
Returns true if this string is equal to the contents of the specified StringBuffer, false otherwise.
Uses this string as a format string and returns a string obtained by substituting the specified arguments, using the default locale.
Uses this string as a format string and returns a string obtained by substituting the specified arguments, using the specified locale.
Returns the index within this string that is offset from the given index by codePointOffset code points.
Creates a new reader for the string.
Returns true if the specified range in this string is equal to the specified range in another string.
Encodes the contents of this string using the specified character set and returns the resulting byte array.
Copies characters from this string into the destination character array and returns that array.
Returns a copy of this string converted to lower case using the rules of the specified locale.
Returns a new SortedSet of all characters.
Returns a copy of this string converted to upper case using the rules of the specified locale.