O'Reilly logo

Learn Lua for iOS Game Development by Jayant Varma

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required