There are three new text extraction functions in PropertyWizard version 1-8-2. They give you more options for extracting sub-strings from a string of text, alongside the existing substr(<text>, <index>, <count>) function.
This new function returns the end of the <text>, starting from character number <index>. The first character index is zero.
This operates just like substr(<text>, <index>, <count>) but returns all the characters from <index> to the end of the text, not just <count> characters. It’s useful if you want to get rid of the first <count>+1 characters from the text, but don’t know how long the text will be.
For example, if you want to extract the level number, but your levels are named ‘Level 1’, ‘Level 2’, … , ‘Level 9’, ‘Level 10’, you could use this function:
leftstr(<text>, <count>), and rightstr(<text>, <count>)
These two new functions return <count> characters from the start or end of the <text>.
You could achieve the same effect in earlier versions by using substr(<text>, <index>, <count>), but these new functions are much easier to write and understand.
For example, if your levels are named with two-digit numbers ‘Level 01’, ‘Level 02’, … , ‘Level 09’, ‘Level 10’, you could use this function to extract just the number:
You can download xmls for these formulas to import into your own projects – you will need to change the target properties to suit your projects.