I know in python you can use the index of characters to 'slice' your string using square brackets, eg:
string = "This is my string" print (string[0:5])
Which would print 'This'.
I've tried doing this with Lua in the same way:
local my_string = "This is a string"
print(my_string[:1])
Though I just get an error "unexpected symbol near ':'"
Any guidance on this would be appreciated =)

1 comment
That would be acceptable in Python. However, as Blue has shown, getting different ranges of text is a bit different.