- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mukul Latiyan has Published 474 Articles
Mukul Latiyan
12K+ Views
There are cases when we want to format strings which will help us to print the output in a particular format.When we use the string.format() function it returns a formatted version of its variable number of arguments following the description given by its first argument, the so-called format string.The format ... Read More
Mukul Latiyan
19K+ Views
string.find() is one of the most powerful library functions that is present inside the string library.Lua doesn’t use the POSIX regular expression for pattern matching, as the implementation of the same takes 4, 000 lines of code, which is actually bigger than all the Lua standard libraries together. In place ... Read More
Mukul Latiyan
6K+ Views
There are so many scenarios where you might want to convert a decimal value into a character representation. The character representation of a decimal or integer value is nothing but the character value, which one can interpret using the ASCII table.In Lua, to convert a decimal value to its internal ... Read More
Mukul Latiyan
10K+ Views
The string.byte() function is one of the most widely used Lua string library functions that takes a character or a string as an argument and then converts that character into its internal numeric representations.The character to internal numeric representations can be easily interpreted from the ASCII table.Syntaxstring.byte(ch) or string.byte(ch, idx)In ... Read More
Mukul Latiyan
8K+ Views
One of the most used functions in Lua is the sort function which is provided by the Lua library which tables a table as an argument and sorts the values that are present inside the table.The sort function also takes one more argument with the table and that argument is ... Read More
Mukul Latiyan
455 Views
There are very few sections we will explore the possibility of making use of a semicolon in Lua. Majority of the code doesn’t require it, while there are some cases where we might need them.ExampleLet’s consider a case where the use of semicolon seems necessary. Consider the example shown below ... Read More
Mukul Latiyan
7K+ Views
The select function in Lua is used to return the number of arguments that are passed into it as an argument. It can be used in two forms, the first one includes passing an index and then it will return the numbers that are passed after that number into the ... Read More
Mukul Latiyan
603 Views
While working with tables, we can easily access and modify the values present in the tables provided we know the key. But there are cases where we would like our tables to be in read-only format so that the values present inside the table cannot be modified.There are many benefits ... Read More
Mukul Latiyan
479 Views
The idea of passing Lua script from C++ to Lua includes the fact that we will have to load the libraries and header files as Lua is ANSI C, and if we are coding in C++, we will need to enclose the #includes in extern “C”.The old and mostly used ... Read More
Mukul Latiyan
2K+ Views
There are several occurrences when we want to get the integer value of a number and also the fractional value that the number has if any, so that we can use either or both of these values.Lua provides us with a math.modf() function that we can use to find the ... Read More