Normalise

Joomla Framework String Normalise Class

abstract
since

1.0

package

Joomla Framework

Methods

fromCamelCase

Method to convert a string from camel case.

fromCamelCase(string input, bool grouped = false) : string
static

This method offers two modes. Grouped allows for splitting on groups of uppercase characters as follows:

"FooBarABCDef" becomes array("Foo", "Bar", "ABC", "Def") "JFooBar" becomes array("J", "Foo", "Bar") "J001FooBar002" becomes array("J001", "Foo", "Bar002") "abcDef" becomes array("abc", "Def") "abc_defGhi_Jkl" becomes array("abc_def", "Ghi_Jkl") "ThisIsA_NASAAstronaut" becomes array("This", "Is", "A_NASA", "Astronaut")) "JohnFitzgerald_Kennedy" becomes array("John", "Fitzgerald_Kennedy"))

Non-grouped will split strings at each uppercase character.

since

1.0

Arguments

input

stringThe string input (ASCII only).

grouped

boolOptionally allows splitting on groups of uppercase characters.

Response

stringThe space separated string.

toCamelCase

Method to convert a string into camel case.

toCamelCase(string input) : string
static
since

1.0

Arguments

input

stringThe string input (ASCII only).

Response

stringThe camel case string.

toDashSeparated

Method to convert a string into dash separated form.

toDashSeparated(string input) : string
static
since

1.0

Arguments

input

stringThe string input (ASCII only).

Response

stringThe dash separated string.

toKey

Method to convert a string into key form.

toKey(string input) : string
static
since

1.0

Arguments

input

stringThe string input (ASCII only).

Response

stringThe key string.

toSpaceSeparated

Method to convert a string into space separated form.

toSpaceSeparated(string input) : string
static
since

1.0

Arguments

input

stringThe string input (ASCII only).

Response

stringThe space separated string.

toUnderscoreSeparated

Method to convert a string into underscore separated form.

toUnderscoreSeparated(string input) : string
static
since

1.0

Arguments

input

stringThe string input (ASCII only).

Response

stringThe underscore separated string.

toVariable

Method to convert a string into variable form.

toVariable(string input) : string
static
since

1.0

Arguments

input

stringThe string input (ASCII only).

Response

stringThe variable string.