I'm doing an audit on forthcoming string operations on properties in Touchgram. Most of the following are implemented already, which means (when they are exposed in the UI), people will be able to build up quite complex logic. (This is for the 1% of crazy creatives, the folks who craft stuff in Minecraft, who will build templates used by others. It's not going to be a typical user feature.)
Would appreciate comments on completeness - have I missed anything?
Note that there's not an internal scripting language in Touchgram - all logic is stashed in our binary file format. So don't worry about the names of these operations, there will be a UI on top of building expressions with them.
lowercase
uppercase
toString (any property type, numbers, colours, etc.)
join (operation on list of any properties, repeating toString, with specified join string)
append
insertAt
replace (inc case-insensitive)
replaceGrep
repeats - generate new string from N repetitions
trim (inc case-insensitive) - removes matching suffix string
trimN
delSubstr
deleteAt (1 char)
getAt -> (1 char)
getLastN:
getSubstr
length
indexOf (inc case-sensitive)
asNumber - converts string to int or float
< <= = != >= >
contains (inc case-sensitive)
containsGrep
startsWith (inc case-sensitive)