CommonUtils

Members

(static) NodeContains

check if node contains specified child

Source:

fillText

Fills text with count of fillChars

Source:

Methods

(static) ArrayContains(array, value, compareAttribute) → {Boolean}

check if array contains specified value

Source:
Parameters:
Name Type Description
array Dynamic

array to search in

value Dynamic

value to check

compareAttribute Dynamic

attribute to compare on

Returns:
Type:
Boolean
  • true if array contains a value, else return false

(static) AsArray(value) → {Array}

if type of value equals array return value, else return array with one element [value]

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Array
  • converted array

(static) AsBoolean(input) → {Boolean}

convert input to Boolean if this possible, else return False

Source:
Parameters:
Name Type Description
input Dynamic

value to check

Returns:
Type:
Boolean
  • converted boolean

(static) AsDouble(input) → {Float}

convert input to Double if this possible, else return 0.0

Source:
Parameters:
Name Type Description
input Dynamic

value to check

Returns:
Type:
Float
  • converted Double

(static) AsFloat(input) → {Float}

convert input to Float if this possible, else return 0.0

Source:
Parameters:
Name Type Description
input Dynamic

value to check

Returns:
Type:
Float
  • converted Float

(static) AsInteger(input) → {Integer}

convert input to Integer if this possible, else return 0

Source:
Parameters:
Name Type Description
input Dynamic

value to check

Returns:
Type:
Integer
  • converted Integer

(static) AsLongInteger(input) → {Integer}

convert input to LongInteger if this possible, else return 0

Source:
Parameters:
Name Type Description
input Dynamic

value to check

Returns:
Type:
Integer
  • converted LongInteger

(static) AsString(input) → {String}

convert input to String if this possible, else return empty string

Source:
Parameters:
Name Type Description
input Dynamic

value to check

Returns:
Type:
String
  • converted string

(static) FindElementIndexInArray(array, value, compareAttribute, caseSensitive) → {Integer}

find an element index in array

Source:
Parameters:
Name Type Description
array Dynamic

array to search

value Dynamic

value to check

compareAttribute Dynamic

attribue to use for comparisons

caseSensitive Boolean

indicates if comparisons are case sensitive

Returns:
Type:
Integer
  • element index if array contains a value, else return -1

(static) FindElementIndexInNode(node, value) → {Integer}

find an element index in node

Source:
Parameters:
Name Type Description
node Dynamic

node to search in

value Dynamic

child to search for

Returns:
Type:
Integer
  • element index if node contains a value, else return -1

(static) IsArray(value) → {Boolean}

check if value contains Array interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains Array interface, else return false

(static) IsAssociativeArray(value) → {Boolean}

check if value contains AssociativeArray interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains AssociativeArray interface, else return false

(static) IsBoolean(value) → {Boolean}

check if value contains Boolean interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains Boolean interface, else return false

(static) IsDateTime(value) → {Boolean}

check if value contains DateTime interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains DateTime interface, else return false

(static) IsDouble(value) → {Boolean}

check if value contains Double interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains Double interface, else return false

(static) IsFloat(value) → {Boolean}

check if value contains Float interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains Float interface, else return false

(static) IsFunction(value) → {Boolean}

check if value contains Function interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains Function interface, else return false

(static) IsInteger(value) → {Boolean}

check if value type equals Integer

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value type equals Integer, else return false

(static) IsList(value) → {Boolean}

check if value contains List interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains List interface, else return false

(static) IsLongInteger(value) → {Boolean}

check if value contains LongInteger interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains LongInteger interface, else return false

(static) IsNotEmptyString(value) → {Boolean}

check if value contains String interface and length more 0

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains String interface and length more 0, else return false

(static) IsNullOrEmpty(value) → {Boolean}

check if value is invalid or empty

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value is null or empty string, else return false

(static) IsNumber(value) → {Boolean}

check if value contains LongInteger or Integer or Double or Float interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value is number, else return false

(static) IsSGNode(value) → {Boolean}

check if value contains SGNodeChildren interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains SGNodeChildren interface, else return false

(static) IsString(value) → {Boolean}

check if value contains String interface

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value contains String interface, else return false

(static) IsValid(value) → {Boolean}

check if value initialized and not equal invalid

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
Boolean
  • true if value initialized and not equal invalid, else return false

(static) ValidStr(value) → {String}

return value if his contains String interface else return empty string

Source:
Parameters:
Name Type Description
value Dynamic

value to check

Returns:
Type:
String
  • value if his contains String interface else return empty string

EqArray(Vallue1, Vallue2) → {boolean}

Compare to roArray objects for equality.

Source:
Parameters:
Name Type Description
Vallue1 Dynamic

first array

Vallue2 Dynamic

second array

Returns:
Type:
boolean
  • True if arrays are equal or False in other case.

EqAssocArray(Vallue1, Vallue2) → {boolean}

Compare to roAssociativeArray objects for equality.

Source:
Parameters:
Name Type Description
Vallue1 Dynamic

first associative array

Vallue2 Dynamic

second associative array

Returns:
Type:
boolean
  • True if arrays are equal or False in other case.

EqValues(Vallue1, Vallue2) → {boolean}

Compare two arbtrary values to eachother.

Source:
Parameters:
Name Type Description
Vallue1 Dynamic

first item to compare

Vallue2 Dynamic

second item to compare

Returns:
Type:
boolean
  • True if values are equal or False in other case.