Browse topics
Kotlin Intermediate
Kotlin Strings
String basics, templates, comparison, substring and raw strings.
kotlin stringsString Basics in KotlinString is an immutable sequence of characters in Kotlin. A Kotlin example with source code and sample output.kotlin stringsString Concatenation in KotlinStrings can be joined using the + operator. A Kotlin example with source code and sample output.kotlin stringsString Templates in KotlinString templates embed variables and expressions inside strings. A Kotlin example with source code and sample output.kotlin stringsString Comparison in KotlinUse == and != for structural (content) comparison of strings. A Kotlin example with source code and sample output.kotlin stringsString Length and Substring in KotlinThe length property returns the number of characters in a string. A Kotlin example with source code and sample output.kotlin stringsRaw Strings in KotlinRaw strings use triple quotes and preserve line breaks and special characters. A Kotlin example with source code and sample output.
Related topics
Null Safety Nullable types, safe casts, let, lateinit and null handling in Kotlin. Kotlin Arrays Declare, initialize, access and iterate arrays in Kotlin. Collections Intro Lists, sets, maps and common collection operations. Packages & Imports Organize code with packages, imports and visibility modifiers. Exception Handling try-catch, finally, throw, custom exceptions and try expressions. Type Features Type aliases, destructuring declarations and related Kotlin type syntax.