Methods
(inner) decapitalize(String, upperRest)
Decapitalizes the first letter of a string.
Parameters:
Name | Type | Description |
---|---|---|
String |
String | |
upperRest |
Boolean |
- Source:
Example
decapitalize('FooBar');
// return'fooBar'
decapitalize('FooBar', true);
// return 'fOOBAR'
(inner) sortCharactersInString(str) → {String}
Alphabetically sorts the characters in a string.
Parameters:
Name | Type | Description |
---|---|---|
str |
String |
- Source:
Returns:
Alphabetically sorted string.
- Type
- String
Example
sortCharactersInString('cabbage');
// return 'aabbceg'