Problem Statement
How do you insert a variable into a string in Kotlin?
Explanation
Kotlin uses string templates with the dollar sign to embed variables and expressions directly in strings, making string concatenation more readable and concise than using plus operators. You can insert simple variables with dollar name or evaluate expressions with dollar curly braces like dollar curly braces name dot length curly braces. This feature is similar to template literals in JavaScript or f-strings in Python, and it works in both single-line and multi-line strings, making string manipulation in Kotlin very convenient and expressive.
