Kotlin Strings
String basics, templates, comparison, substring and raw strings.
1
kotlin strings
2String Basics in Kotlin
String is an immutable sequence of characters in Kotlin. A Kotlin example with source code and sample output.
kotlin strings
3String Concatenation in Kotlin
Strings can be joined using the + operator. A Kotlin example with source code and sample output.
kotlin strings
4String Templates in Kotlin
String templates embed variables and expressions inside strings. A Kotlin example with source code and sample output.
kotlin strings
5String Comparison in Kotlin
Use == and != for structural (content) comparison of strings. A Kotlin example with source code and sample output.
kotlin strings
6String Length and Substring in Kotlin
The length property returns the number of characters in a string. A Kotlin example with source code and sample output.
kotlin strings
Raw Strings in Kotlin
Raw strings use triple quotes and preserve line breaks and special characters. A Kotlin example with source code and sample output.