Strings in Lua are sequences of bytes... Lua is eight-bit clean and its strings can contain bytes with any numeric code, including embedded zeros.
Roberto Ierusalimschy.
Basics: a change, length operator and concatenation operator
![lua_strings_1.png](https://images.hive.blog/768x0/https://steemitimages.com/DQmW4Xz9nQT2xnqd4awSLrRiWAikFwN99azrbQG9REj4Ur5/lua_strings_1.png)
Escape sequences in Lua
C-like Escape Sequence | Character |
---|---|
\a | bell |
\b | backspace |
\f | form feed |
\n | newline |
\r | carriage return |
\t | horizontal tab |
\v | vertical tab |
\\ | backslash |
\" | double quote |
\' | single quote |
![lua_strings_2.png](https://images.hive.blog/768x0/https://steemitimages.com/DQmXoLBYCdDgmUhffCGnkNHNwVbzuj8rHShVCbtjokPmaJv/lua_strings_2.png)
Corecions
![lua_strings_3.png](https://images.hive.blog/768x0/https://steemitimages.com/DQmQ96kvNJMmKhyt8Tt5jaYwGbLBRq6cRnnYiRY1yAkpXN6/lua_strings_3.png)
The String Library
![lua_strings_4.png](https://images.hive.blog/768x0/https://steemitimages.com/DQmbYs2wgWxEjeeyTXqJJybJhU8LVWeU17PTBMQ9B9QasQb/lua_strings_4.png)
Format and More:
![lua_strings_5.png](https://images.hive.blog/768x0/https://steemitimages.com/DQmcuTjpM65hdntvbtnHDM2hxZdfaZzR4js2jtTgacwpesY/lua_strings_5.png)
Unicode
![lua_strings_6.png](https://images.hive.blog/768x0/https://steemitimages.com/DQmZrqLGwiK8vk9hNhYwrUtPECR5nWowbJEBeab6EgdKEby/lua_strings_6.png)
- Roberto Ierusalimschy, Programming in Lua, Fourth Edition.
- lua.org
Previous post
About Hacking, Is Lua better that Python?
Maybe the response is in this post about hackers