Lua String Libary Quiz
Posted: Sat Dec 05, 2015 6:47 pm
A lot of people seem unexperienced with the string libary, so I thought I'd open a thread where people can find nice examples to practice.
Feel free to add challenges of your own, or give a better soloution to a previously solved puzzle.
Preferably make puzzles that have "real world application", so people can see how useful knowledge of the string libary is.
I'll go first:
Let's say you have a camera that saves your pictures in the following naming convention:
IMG_20151023_133742.jpg
Now create a program that would print out a string like this for every image file in a folder:
Picture taken at 13:37:42 on 23/10/2015.
Not that you could also easily make a program that renames all the files like this using os.rename.
Give it a shot!
Feel free to add challenges of your own, or give a better soloution to a previously solved puzzle.
Preferably make puzzles that have "real world application", so people can see how useful knowledge of the string libary is.
I'll go first:
Let's say you have a camera that saves your pictures in the following naming convention:
IMG_20151023_133742.jpg
Now create a program that would print out a string like this for every image file in a folder:
Picture taken at 13:37:42 on 23/10/2015.
Not that you could also easily make a program that renames all the files like this using os.rename.
Give it a shot!