Il 07/11/2015 18:54, Dirk Laurie ha scritto:
local s = tokens( "apple.banana.cherry.grape.orange",".")
Because 46 is the ASCII code of the dot. If I want, for example, tokenize
the string with another character (which can be a letter, number, comma,
semicolon, hash or any ASCII character from 1 to 255) with your code this is
not possible because it is limited to only dot as a separator between
tokens.
local text = "Roses-are-red-violets-are-blue"
As you can see, your code is unable to get "violets", when you just need
enter 45 instead of 46.