Elementals.js

Latest Version: 3.0 RC 1 17 July 2017

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)

Key

  • Object
  • Method
  • "Constant" property

Downloads

Advertisement