Raw Strings
We'll cover the following...
Dealing with escape characters makes the code messy. Instead of using escaped strings, in Kotlin we may use raw strings which start and end with three double quotes. We may use raw strings to place any character, without the need to use escapes, and may also use them to create multiline strings.
No escape
In an escaped string which starts and ends with a single double quote, we can’t place a variety of characters, like new line or a double quote, for example, without using the escape character \
. Even a simple case can be unpleasant to read, like this one:
val escaped = "The kid asked, \"How's it going, $name?\""
We had to escape the double quotes that were needed within the string. The more we use ...