Token Modifiers
Tokens for modifying strings
The tokens below can be used to modify tokens or strings:
Token |
Description |
Example |
{left,n,str} |
Extracts the first n characters from str (which can be a string or token). |
{left,4,{filename}} for D:\Photos\image1.jpg will give: image |
{mid,n,m,str} |
Extracts m characters starting from the n'th character from str (which can be a string or token). |
{mid,1,3,{filename}} for D:\Photos\image1.jpg will give: mag {mid,3,,{filename}} for D:\Photos\image1.jpg will give: ge1 |
{right,n,str} |
Extracts the last n characters from str (which can be a string or token). |
{right,2,{filename}} for D:\Photos\image1.jpg will give: e1 |
{field,n,str} |
Extracts the nth field from str. Fields are separated by space, period, hyphen, slash, backslash or underscore characters |
{field,2,{filename}} for D:\Photos\IMG_0001.jpg will give: IMG |
{first,str} |
Extracts the first word from str (which can be a string or token). |
{first,%L} for an image taken Monday, January 17, 2015 will give: Monday |
{last,str} |
Extracts the last word from str (which can be a string or token). |
{last,%L} for an image taken Monday, January 17, 2015 will give: 2015 |
{upper,str} |
Converts str to upper case |
{upper,%B} for a photo taken in June gives: JUNE |
{lower,str} |
Converts str to lower case |
{lower,%B} for a photo taken in June gives: june |
{capitalize,str} |
Converts str to lower case and capitalizes the first letter |
{capitalize,john} gives John |
{default,str1,str2} |
Returns str1 unless it is an empty string in which case it returns str2 (str1 and str2 can be strings or tokens |
{default,1,2} returns 1 {default,,2} returns 2 |
{if,test,str1,str2} |
Returns str1 if test contains any text except 0 else returns str2 (test, str1 and str2 can be strings or tokens) |
{if,1,2,3} returns 2 {if,0,2,3} returns 3 {if,,2,3} returns 3 |
{compare,str1,str2} |
Returns 1 if str1 is the same as str2 else returns an empty string |
{compare,photo,photo} returns 1, {compare,photo,image} returns empty string |
{urlencode,str} |
Encodes str so that it can be used as a parameter in a URL e.g. when providing a URL for a microsite |
https://yoursite.com/viewer.php?id={urlencode,my name} gives https://yoursite.com/viewer.php?id=my%20name |
{tinyUrl,str} |
Converts a URL to a shortened version using tinyurl.com |
https://breezesys.com/BreezeBooth/betatest.htm is shortened to https://tinyurl.com/ycnmcn8n |
{encrypt,str} |
Encrypts a string. This token is intended for use with QR codes on prints which can be scanned in by the app and decoded using the {decrypt,str} token. |
|
{decrypt,str} |
Decrypt a string that has been encrypted using {encrypt,str} |