More on Strings
Literal Strings
- Can use either single (') or double (") quotes
- The other type of quote can be used within the string
Escape Sequences
\a - bell
\b - back space
\f - form feed
\n - newline
\r - carriage return
\t - horizontal tab
\v - vertical tab
\\ - backslash
\" - double quote
\' - single quote
```
**Long Strings**
```
-- a long string
longString = [[This is a
very long string
that goes on and on]]
print (longString)
-- another long string
anotherString = [===[This is another
long string that has
some double brackets [[]] in it]===]
print (anotherString)
print("This is a string\nthat goes on also")
```
**Coercions**
* There are automatic coercions between numbers and strings