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.0Constructors
Types
Functions
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 a copy of this string having its first letter titlecased using the rules of the default locale, or the original string if it's empty or already starts with a title case letter.
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.
Returns a copy of this string having its first letter lowercased using the rules of the default locale, or the original string if it's empty or already starts with a lower case letter.
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 true if this string is empty or consists solely of whitespace characters.
Returns the index within this string that is offset from the given index by codePointOffset code points.
Returns true if the specified range in this string is equal to the specified range in another string.
Returns true if the specified range in this char sequence is equal to the specified range in another char sequence.
Returns true if this string starts with the specified prefix.
Returns true if a substring of this string starting at the specified offset startIndex starts with the specified prefix.
Returns a substring of this string that starts at the specified startIndex and continues to the end of the string.
Returns the substring of this string starting at the startIndex and ending right before the endIndex.
Encodes the contents of this string using the specified character set and returns the resulting byte array.
Returns a CharArray containing characters of this string.
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 default locale.
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 default locale.
Returns a copy of this string converted to upper case using the rules of the specified locale.