String

string : object

Useful namespace for helping with String utility functions

Kind: global namespace

string.stringToJson(attrString) ⇒ object

Converts and formats the inputted string to a json object.

Kind: static method of string
Returns: object - - object in json form

Param Type Description
attrString string the string to be formatted

string.jsonToString(componentData) ⇒ string

Converts and formats the inputted json object into a string.

Kind: static method of string
Returns: string - - the string representation of the json object

Param Type Description
componentData object the json object to be formatted into a string

string.stringToVector(str) ⇒ object

Converts a string to vector format.

Kind: static method of string
Returns: object - - the vector version of the inputted string.

Param Type Description
str string the string to be converted to a vector. Must be of format ‘xx xxx xx…’.

string.stringToDegVector(str) ⇒ object

Converts a string to vector format where the numbers are pre-converted from radians to degrees.

Kind: static method of string
Returns: object - - the vector version of the inputted string.

Param Type Description
str string the string to be converted to a vector. Must be of format ‘xx xxx xx…’.

string.stringToDimensionValue(val) ⇒ number

Converts a string to vector format where the numbers are pre-converted from a number to an appropriate representation

Kind: static method of string
Returns: number - - the vector version of the inputted string.

Param Type Description
val string the string to be converted to a vector. Must be of format ‘x%’ or ‘x/y’.