Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inputString = 'test string 0123456789'
- discordLargeText = ''
- for i=1,#inputString do
- currChar = inputString:sub(i,i):lower()
- if currChar:match('%a') then
- discordLargeText = discordLargeText .. ':regional_indicator_' .. currChar .. ': '
- elseif currChar:match('%s') then
- discordLargeText = discordLargeText .. ':white_large_square: '
- elseif currChar:match('%d') then
- local numbers = {'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'}
- discordLargeText = discordLargeText .. ':' .. numbers[currChar + 1] .. ': '
- end
- end
- print(discordLargeText)
Advertisement
Add Comment
Please, Sign In to add comment