-
Notifications
You must be signed in to change notification settings - Fork 0
API reference documentation
fcharest edited this page Apr 30, 2015
·
1 revision
Compares two strings ignoring case. Returns true if they are equals.
utilities.equalsIgnoreCase('Abc', 'abc'); // true
Returns true when target is matched in the provided string.
utilities.startsWithIgnoreCase('Abc', 'a'); // true
Capitalize the first letter of the provided string.
utilities.capitaliseFirstLetter('abc'); // 'Abc'
Changes the case of the string's first letter to lower case.
utilities.uncapitaliseFirstLetter('ABC'); // 'aBC'
Removes HTML from the provided string.
utilities.stripHtmlFromText('<h1>Title</h1>'); // 'Title'
Removes whitespaces starting from the right end of the string. When pattern is provided, trims using this pattern instead.
utilities.trimRight('Some text with white space '); // 'Some text with white space'
utilities.trimRight('http://example.com/test/', '/'); // 'http://example.com/test'
Returns slugified string from the provided string.
utilities.toSlug('This, That & the Other! Various Outré Considerations'); // 'this-that-the-other-various-outre-considerations'