Kotlin TutorialLesson 10Free preview
Kotlin Strings
This lesson is part of Kotlin · All levels
Summary
This lesson discusses text manipulation and features of String Templates in Kotlin. Strings in Kotlin support interpolation of variables and direct expression within the string using the dollar symbol ($). In addition, there is a multi-line raw string feature that makes it easy to write long text formats.
Key points
- Strings are declared using the double quotes '"..."'
- String templates use '$variable' to insert variables into text
- Complex expressions can be inserted with curly braces '${expression}'
- Raw string diapit quotes three '"""..."""' for text with many lines without escape characters
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.