As per my research,
Kotlin has two types of string literals:-
Escaped strings that may have escaped characters in them .
val s = "Hello ,World\n" +
"from escaped string\n"+
"kotlin"
Raw string is delimited by a triple quote ("""), contains no escaping and can contain newlines and any other characters:
val m = """Hello, World
|from raw string
|kotlin """.trimMargin()
These strings can be used in multi lines without the need to concatenate each line and an without escaping.
Do we use raw strings only for simplicity and easy implementation or do these offer some better performance in any case?
And are these any other use-cases where we should consider using raw strings?