Module talk:Sandbox

From PKC
Jump to navigation Jump to search
byte
string.byte('A') is 65
char
string.char(65) is A
find
string.find('that', 'at') is 3
format
string.format('%.2f', 0) is 0.00
gmatch
This-is-a-test-
gsub
string.gsub('This is a test', '%s', '-') is This-is-a-test
len
string.len('len') is 3
lower
string.lower('LOWER') is lower
match
string.match('This is a test!', '.', -1) is !
rep
string.rep('*', 5) is *****
reverse
string.reverse('reverse') is esrever
sub
string.sub('that', 2, 3) is ha
upper
string.upper('upper') is UPPER