Hey there.
Axy has a cool subset of tools to modify strings.
But I can't seem to find a tool that allows me to brake up long text into chunks based on the character count.
In pseudocode, what I want to do is:
string = "Hello my dear fellows. This string contains quite a few characters"
string1 = string:sub(1,50)
string2 = string:sub(51)
string1 - "Hello my dear fellows. This string contains quite "
string2 - "a few characters"
Funny enough it works exactly like this with a script compound...:-)compound...:-)
--$ inString string --$ inLength integer --$ outString1 string --$ outString2 string outString1 = inString:sub(1, inLength) outString2 = inString:sub(inLength + 1)
Hi Eric,
You could use the Text Slice module.
Just set Count to 50 and Start Index to 50 for the second slice, like here:
Note this module can be a bit confusing if you have a programming background.
It doesn't just function as string.substring(), but also as string.split().
If you don't change Item Size. Then Start Index is the character's position where the string will start and the Count is the length of the string.
Item Size is useful when you are slicing the Text with the Separators. By increasing its value, it will also contain the Separators...
Warmest regards,