Search:
jgrouse.string
module jgrouse.string
Utilities for string manipulations
Defined in jgrouse/string.js
Function Summary
Converts string to "mixed case" by removing all '-' signs from string and capitalizing first letters of each word.
Convert the first letter of string to lower case
Remove leading whitespaces from string.
Remove trailing whitespaces from string.
Remove leading and trailing whitespaces from string.
Convert the first letter of string to uppercase
Function Details
function camelize
String camelize(String str)
Converts string to "mixed case" by removing all '-' signs from string and capitalizing first letters of each word.
For example, string 'this-is-a-sample' would be converted to 'thisIsASample'
Parameters:
str - source string string converted to 'mixed case'
Defined in jgrouse.string
function lowerFirst
String lowerFirst(String str)
Convert the first letter of string to lower case
Parameters:
str - source string string with first character converted to lower case
Defined in jgrouse.string
function ltrim
String ltrim(String str)
Remove leading whitespaces from string.
Whitespaces are ' ', '\f', '\n', '\r' and '\t'.
Parameters:
str - original stringfunction rtrim
String rtrim(String str)
Remove trailing whitespaces from string.
Whitespaces are ' ', '\f', '\n', '\r' and '\t'.
Parameters:
str - original stringfunction trim
String trim(String str)
Remove leading and trailing whitespaces from string.
Whitespaces are ' ', '\f', '\n', '\r' and '\t'.
Parameters:
str - original stringfunction upperFirst
String upperFirst(String str)
Convert the first letter of string to uppercase
Parameters:
str - source string string with first character converted to upper case
Defined in jgrouse.string