Chapter 5
Strings
Hopefully you survived the previous chapter, on Lua math. The whole idea of these first few chapters is to introduce you to the fact that you can create your logic in Lua and then use any framework to add the graphics. So, many of the functions that we shall create in these chapters can be used universally across most of the frameworks without many changes. In this chapter we shall explore the topic of strings.
What Is a String?
A string is one of the many variable types available in Lua. It can hold alphanumeric characters of arbitrary lengths. It cannot have multiple dimensions like a table can. Lua automatically converts strings into numbers if the strings are used in any form of arithmetic operation. This process is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access