Elementals.js

Latest Version: 3.7 Final 20 December 2018

Method String.stripCamel

Calling Convention:
String.stripCamel([delimiter])
Parameters:
delimiter optional, default "-"
The character to be added to a string before any upper-case characters before converting them to lower-case.
Returns:
A string result where "camelCase" has been stripped, with delimiter added as appropriate

Example #1, no delimiter

JavaScript
var jsName = "quickTestVariable";
console.log(jsName.stripCamel());
Output
quick-test-variable

Example #2, with delimiter

JavaScript
var jsName = "quickTestVariable";
console.log(jsName.stripCamel('+'));
Output
quick+test+variable

Example #3, empty delimiter

JavaScript
var jsName = "quickTestVariable";
console.log(jsName.stripCamel(''));
Output
quicktestvariable

Elementals String Methods

Elementals Extensions

Polyfills

These link to the Mozilla Developer Network (MDN)

Property Key

  • Object
  • Method or Variable
  • "Constant" Variable

Downloads

Advertisement