kotlin.String API Reference
Kotlin's String — an immutable sequence of UTF-16 code units, enhanced with extension functions.
String
Represents a character sequence. Kotlin String is immutable and bridges to java.lang.String.
String.length: IntReturns the length of this character sequence.
Returns: Int
String.uppercase(): StringReturns a string with all characters converted to uppercase using default locale rules.
Returns: String
String.lowercase(): StringReturns a string with all characters converted to lowercase using default locale rules.
Returns: String
String.split(vararg delimiters: String): List<String>Splits this string around matches of the given delimiters.
Returns: List<String>
String.replace(oldValue: String, newValue: String): StringReturns a new string with all occurrences of oldValue replaced with newValue.
Returns: String
String.contains(other: CharSequence): BooleanReturns true if this string contains the specified char sequence.
Returns: Boolean
String.trim(): StringReturns a string with leading and trailing whitespace removed.
Returns: String
String.startsWith(prefix: String): BooleanReturns true if this string starts with the specified prefix.
Returns: Boolean