Skip to main content

String Utilities

These utilities help you analyze properties and safely transform layout structures of text data.

len

Returns the total character count (length) of a given string.

bamboo message = "TinyPanda";
echoln(len(message)); // Outputs: 9

upper

Transforms all alphabetical characters in a string to uppercase.

bamboo upCase = "hello world";
echoln(upper(upCase)); // Outputs: HELLO WORLD

lower

Transforms all alphabetical characters in a string to lowercase.

bamboo lowCase = "TINY PANDA";
echoln(lower(lowCase)); // Outputs: tiny panda

reverse

Reverses the characters in a string. Returns a new string without modifying the original.

bamboo text = "TinyPanda";
bamboo reversed = reverse(text);
echoln(reversed); // "adnaPyniT"
echoln(text); // "TinyPanda"

echoln(reverse("aprim")); // "mirpa"