13. String operations

String operations group is intended to perform different data manipulations with JavaScript strings.

Let's say we have the following JavaScript file:
greeting = 'Hello, World !';

text = 'i can do it';

untrimmedText = '  No more excuses !   ';

fruits = ['Mango', 'Banana', 'Mango', 'Annona', 'Grape'];

The following table explains each operation and shows examples related to the JavaScript file above:

Operatoin Explanation Example Result
^U Uppercases a string.
^U1 Capitalizes first letter in string.
I can do it
^L Lowercases a string
hello, world !
^T Trims a string
No more excuses !
^LEN Calculates string length
^S Stringifying

All those operations ( except ^S ) are applicable for strings and ignored for others.

You can chain those operations multiple times.
For example first trimming and then uppercasing:

Watch a demo