Method String.toCamel
- Calling Convention:
-
String.toCamel([delimiter])
- Parameters:
-
- delimiter optional, default "-"
- The character to be stripped from the string where the next character will be converted to upper-case.
- Returns:
- A string result where delimiter has been removed, the next letter capitolized.
Example #1, no delimiter
JavaScript
var jsName = "quick-test-variable";
console.log(jsName.toCamel());
Output
quickTestVariable
Example #2, with delimiter
JavaScript
var jsName = "quick-test+variable";
console.log(jsName.toCamel('+'));
Output
quick-testVariable