capitalize
Capitalize the string.
R.capitalize.run('cat')
// Cat
Capitalize the string.
R.capitalize.run('cat')
// Cat
Check regex match.
R.match.run('.*(a).*', 'cat')
// (cat, a)
Pad the string to the length, with given padding.
R.pad.run(5, '*', 'cat')
// *cat*
Pad the string to the left to the length, with given padding.
R.pad.run(5, '*', 'cat')
// **cat
Pad the string to the right to the length, with given padding.
R.pad.run(5, '*', 'cat')
// cat**
Replace the string with replacement, only for the first occurrence of the matching.
R.replace.run('cat', 'dog', 'I love cats')
// I love dogs
Replace the string with replacement, for all occurrences of the matching.
R.replaceAll.run('cat', 'dog', 'I love cats')
// I love dogs
Split the string into a list.
R.split.run(' ', 'a b c')
// (a, b, c)
Test for the string matching.
R.test.run('.*a.*', 'cat')
// true
Convert the string into lowercase.
R.toLower.run('ABC')
// abc
Convert the string into uppercase.
R.toUpper.run('abc')
// ABC
Trim the string.
R.trim.run(' abc ')
// abc
Contribute on Github! Edit this section.