jgrouse.string


module jgrouse.string
Utilities for string manipulations
Defined in jgrouse/string.js

Function Summary
String camelize(String str)
Converts string to "mixed case" by removing all '-' signs from string and capitalizing first letters of each word.
String lowerFirst(String str)
Convert the first letter of string to lower case
String ltrim(String str)
Remove leading whitespaces from string.
String rtrim(String str)
Remove trailing whitespaces from string.
String trim(String str)
Remove leading and trailing whitespaces from string.
String upperFirst(String str)
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
Returns:
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
Returns:
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 string
Defined in jgrouse.string

function rtrim

String rtrim(String str)
Remove trailing whitespaces from string. Whitespaces are ' ', '\f', '\n', '\r' and '\t'.
Parameters:
str - original string
Defined in jgrouse.string

function trim

String trim(String str)
Remove leading and trailing whitespaces from string. Whitespaces are ' ', '\f', '\n', '\r' and '\t'.
Parameters:
str - original string
Defined in jgrouse.string

function upperFirst

String upperFirst(String str)
Convert the first letter of string to uppercase
Parameters:
str - source string
Returns:
string with first character converted to upper case
Defined in jgrouse.string