types.js

Summary
types.js
ng_SIUnitsDefinitions of SI units.
ng_DecimalSeparatorGets decimal separator according to current application language.
ng_decodeSIUnitsDecodes given units to units with exponent (square, quadratic).
ng_CompareSIUnitsCompares two decoded units.
ng_StripSIUnitsStrips units from given string.
ng_getSIUnitsGets SI units definition from given string with units.
Type validation functions
ng_typeStringTests if type of given variable is a string.
ng_typeNumberTests if type of given variable is a number.
ng_typeNumberIntTests if type of given variable is an integer number.
ng_typeNumberFloatTests if type of given variable is a float number.
ng_typeDateTests if type of given variable is a date object.
ng_typeObjectTests if type of given variable is a valid object.
ng_typeArrayTests if type of given variable is an indexed array.
Value validation functions
ng_isEmptyTests if given variable is undefined.
ng_isNullTests if given variable is Null.
ng_isEmptyOrNullTests if given variable is undefined or Null.
ng_isInvalidTests if given variable has invalid value according its type.
ng_isNumberTests if given variable is, or can be lossless converted to, a number.
ng_isIntegerTests if given variable is, or can be lossless converted to, an integer number.
ng_isFloatTests if given variable is, or can be lossless converted to, a float number.
ng_isSByteTests if given variable is, or can be lossless converted to, a signed byte.
ng_isByteTests if given variable is, or can be lossless converted to, a byte.
ng_isShortTests if given variable is, or can be lossless converted to, a short.
ng_isUShortTests if given variable is, or can be lossless converted to, a unsigned short.
ng_isLongTests if given variable is, or can be lossless converted to, a long.
ng_isULongTests if given variable is, or can be lossless converted to, a unsigned long.
ng_isDateTests if given variable is, or can be lossless converted to, a date object.
ng_isNVARCHARTests if given variable is, or can be lossless converted to, a NVARCHAR.
ng_isDECIMALTests if given variable is, or can be lossless converted to, a DECIMAL.
ng_isDateISO8601Tests if given variable is, or can be lossless converted from, date string in ISO 8601 format.
ng_isSIUnitsTests if given variable is, or can be lossless converted from, string with SI units.
ng_isDistanceTests if given variable represents, or can be lossless converted to, a distance.
ng_isAreaTests if given variable represents, or can be lossless converted to, an area.
ng_isSecondsTests if given variable represents, or can be lossless converted to, seconds.
ng_isMinutesTests if given variable represents, or can be lossless converted to, minutes.
ng_isHexTests if given variable represents hexadecimal numbers.
ng_isDigitsTests if value of given variable contains only digits.
ng_isEmailTests if value of given variable is e-mail.
ng_isURLTests if value of given variable is URL.
ng_isWWWTests if value of given variable is web address.
ng_isIP4Tests if value of given variable is IP4 address.
ng_isIP6Tests if value of given variable is IP6 address.
ng_isUnicodeTests if value of given variable is unicode string.
ng_isASCIITests if value of given variable is ASCII string.
Conversions functions
ng_toBoolConverts given variable to boolean.
ng_toStringConverts given variable to string.
ng_toObjectConverts given variable to object.
ng_toNumberConverts given variable to number.
ng_toSByteConverts given variable to signed byte.
ng_toByteConverts given variable to byte.
ng_toShortConverts given variable to short.
ng_toUShortConverts given variable to unsigned short.
ng_toLongConverts given variable to long.
ng_toULongConverts given variable to unsigned long.
ng_toIntegerConverts given variable to integer number.
ng_toFloatConverts given variable to float number.
ng_toDateConverts given variable to date object.
ng_toDateOnlyConverts given variable to date object .
ng_toNVARCHARConverts given variable to NVARCHAR.
ng_toDECIMALConverts given variable to DECIMAL.
ng_toUTCDateConverts given variable to UTC date.
ng_fromUTCDateConverts given variable from UTC date.
ng_toUnixTimestampConverts given variable to UNIX timestamp.
ng_fromUnixTimestampConverts UNIX timestamp to date.
ng_formatDateISO8601Converts given variable to date string in ISO 8601 format.
ng_parseDateISO8601Converts given variable from date string in ISO 8601 format to date.
ng_parseSIUnitsConverts given variable from string with SI units to number.
ng_formatSIUnitsConverts given variable to string followed by SI units.
ng_parseBytesConverts given variable from bytes with units to number.
ng_formatBytesConverts given variable to distance with units.
ng_parseDistanceConverts given variable from distance with units to number.
ng_formatDistanceConverts given variable to distance with units.
ng_parseAreaConverts given variable from area with units to number.
ng_formatAreaConverts given variable to area with units.
ng_parseSecondsConverts given variable from string time to number of seconds.
ng_formatSecondsConverts given variable from number of seconds to string time.
ng_parseMinutesConverts given variable from string time to number of minutes.
ng_formatMinutesConverts given variable from number of minutes to string time.
ng_formatWWWConverts given variable to web address.
ng_toASCIIConverts given variable to ASCII string.
ng_toNonUnicodeConverts given variable to non-unicode string.
ng_toHexConverts given variable to hexadecimal.
ng_Hex2StrDecodes hexadecimal encoded string.
Array functions
ng_idxInArrayFinds given value in indexed array.
ng_inArrayTests if given value is in indexed array.
DateTime functions
ng_DefaultDateFormatGets default date format according to selected language.
ng_DefaultTimeFormatGets default time format according to selected language.
ng_DefaultDateTimeFormatGets default date and time format according to selected language.
ng_DateFormatGets default date format function.
ng_TimeFormatGets default time format function.
ng_DateTimeFormatGets default date and time format function.
ng_ExtractDateExtracts date part from datetime variable.
ng_LeapYearDetects if year is a leap year.
ng_DaysInMonthDetermines number of days in month.
ng_FormatTimeFormats time to string.
ng_FormatDateFormats date to string.
ng_FormatDateTimeFormats date and time to string.
ng_ParseTimeParses time from string.
ng_ParseDateParses date from string.
ng_ParseDateTimeParses date and time from string.
ng_ParseJSONDateTimeParses date string formated by JSON encoder.
ng_GetDateFormatTries to figure out the date format from given text date.
String functions
ng_TrimTrims leading and trailing spaces.
ng_LTrimTrims leading spaces.
ng_RTrimTrims trailing spaces.
ng_StripPrefixStrips given prefix from a string.
ng_StripSuffixStrips given suffix from a string.
ng_AddPrefixAdds given prefix to a string (if not already present).
ng_AddSuffixAdds given suffix to a string (if not already present).
ng_AddSlashAdds slash ‘/’ to end of a string (if not already present).
ng_StripSlashStrips slash ‘/’ from end of a string.
ng_AddBackslashAdds backslash ‘\’ to end of a string (if not already present).
ng_StripBackslashStrips backslash ‘\’ from end of a string.
ng_StripQuotesStrips quotes from quoted string.
ng_QuoteStrAdds quotes to string.
ng_Unformat3NumRemoves thousands separator from string.
ng_Format3NumAdds thousands separator to string.

ng_SIUnits

var ng_SIUnits

Definitions of SI units.

ng_DecimalSeparator

Gets decimal separator according to current application language.

Syntax

mixed ng_DecimalSeparator ()

Parameters

-

Returns

Decimal separator.

ng_decodeSIUnits

function ng_decodeSIUnits(units)

Decodes given units to units with exponent (square, quadratic).

Syntax

object ng_decodeSIUnits (string units)

Parameters

unitsunits string to decode

Returns

Decoded units.

ng_CompareSIUnits

function ng_CompareSIUnits(u1,
u2)

Compares two decoded units.

Syntax

bool ng_CompareSIUnits (object u1, object u2)

Parameters

u1first decoded units
u2second decoded units

Returns

TRUE if units are identical.

ng_StripSIUnits

function ng_StripSIUnits(v,
units)

Strips units from given string.

Syntax

string ng_StripSIUnits (string v, string units)

Parameters

vstring with units
unitsdimension units

Returns

String without units.

ng_getSIUnits

function ng_getSIUnits(v,
units,
def)

Gets SI units definition from given string with units.

Syntax

string ng_getSIUnits (string v, string units[, mixed def=null])

Parameters

vstring with units
unitsdimension units
defdefault value, used if SI units definition not founds

Returns

SI units definition or default value if not found.

Type validation functions

ng_typeString

function ng_typeString(n)

Tests if type of given variable is a string.

Syntax

bool ng_typeString (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is a string

ng_typeNumber

function ng_typeNumber(n)

Tests if type of given variable is a number.

Syntax

bool ng_typeNumber (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is a number

ng_typeNumberInt

function ng_typeNumberInt(n)

Tests if type of given variable is an integer number.

Syntax

bool ng_typeNumberInt (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is an integer number

ng_typeNumberFloat

function ng_typeNumberFloat(n)

Tests if type of given variable is a float number.

Syntax

bool ng_typeNumberFloat (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is a float number

ng_typeDate

function ng_typeDate(d)

Tests if type of given variable is a date object.

Syntax

bool ng_typeDate (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is a date object

ng_typeObject

function ng_typeObject(o)

Tests if type of given variable is a valid object.

Syntax

bool ng_typeObject (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is a valid object

ng_typeArray

function ng_typeArray(v)

Tests if type of given variable is an indexed array.

Syntax

bool ng_typeArray (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is an indexed array

Value validation functions

ng_isEmpty

function ng_isEmpty(n)

Tests if given variable is undefined.

Syntax

bool ng_isEmpty (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is undefined

ng_isNull

function ng_isNull(n)

Tests if given variable is Null.

Syntax

bool ng_isNull (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is Null

ng_isEmptyOrNull

function ng_isEmptyOrNull(n)

Tests if given variable is undefined or Null.

Syntax

bool ng_isEmptyOrNull (mixed var)

Parameters

varvariable to test

Returns

TRUE if type of variable is undefined or Null

ng_isInvalid

function ng_isInvalid(n)

Tests if given variable has invalid value according its type.

Syntax

bool ng_isInvalid (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable has invalid value

ng_isNumber

function ng_isNumber(v)

Tests if given variable is, or can be lossless converted to, a number.

Syntax

bool ng_isNumber (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be a number

ng_isInteger

function ng_isInteger(v)

Tests if given variable is, or can be lossless converted to, an integer number.

Syntax

bool ng_isInteger (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be an integer number

ng_isFloat

function ng_isFloat(v)

Tests if given variable is, or can be lossless converted to, a float number.

Syntax

bool ng_isFloat (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be a float number

ng_isSByte

function ng_isSByte(v)

Tests if given variable is, or can be lossless converted to, a signed byte.

Syntax

bool ng_isSByte (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be a signed byte

ng_isByte

function ng_isByte(v)

Tests if given variable is, or can be lossless converted to, a byte.

Syntax

bool ng_isByte (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be a byte

ng_isShort

function ng_isShort(v)

Tests if given variable is, or can be lossless converted to, a short.

Syntax

bool ng_isShort (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be a short

ng_isUShort

function ng_isUShort(v)

Tests if given variable is, or can be lossless converted to, a unsigned short.

Syntax

bool ng_isUShort (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be a unsigned short

ng_isLong

function ng_isLong(v)

Tests if given variable is, or can be lossless converted to, a long.

Syntax

bool ng_isLong (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be a long

ng_isULong

function ng_isULong(v)

Tests if given variable is, or can be lossless converted to, a unsigned long.

Syntax

bool ng_isULong (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be a unsigned long

ng_isDate

function ng_isDate(v,
format)

Tests if given variable is, or can be lossless converted to, a date object.

Syntax

bool ng_isDate (mixed var [, string format])

Parameters

varvariable to test
formatoptional date and time format string, use default if not specified

Returns

TRUE if variable can be date object

ng_isNVARCHAR

function ng_isNVARCHAR(v,
size)

Tests if given variable is, or can be lossless converted to, a NVARCHAR.

Syntax

bool ng_isNVARCHAR (mixed var [, int size])

Parameters

varvariable to test
sizeoptional size limit

Returns

TRUE if variable can be NVARCHAR

ng_isDECIMAL

function ng_isDECIMAL(v,
digits,
frac_digits)

Tests if given variable is, or can be lossless converted to, a DECIMAL.

Syntax

bool ng_isDECIMAL (mixed var, int digits, int frac_digits)

Parameters

varvariable to test
digitstotal number of digits
frac_digitsnumber of digits in fraction part of number

Returns

TRUE if variable can be DECIMAL

ng_isDateISO8601

function ng_isDateISO8601(v)

Tests if given variable is, or can be lossless converted from, date string in ISO 8601 format.

Syntax

bool ng_isDateISO8601 (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can be in ISO 8601 date format.

ng_isSIUnits

function ng_isSIUnits(v,
units,
allowedpref)

Tests if given variable is, or can be lossless converted from, string with SI units.

Syntax

bool ng_isSIUnits (mixed var, string units [, mixed allowedpref])

Parameters

varvariable to test
unitsdimension units
allowedprefoptional list of allowed SI prefixes

Returns

TRUE if variable can be a string with SI units

ng_isDistance

function ng_isDistance(v)

Tests if given variable represents, or can be lossless converted to, a distance.

Syntax

bool ng_isDistance (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can represent a distance.

ng_isArea

function ng_isArea(v)

Tests if given variable represents, or can be lossless converted to, an area.

Syntax

bool ng_isArea (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can represent an area.

ng_isSeconds

function ng_isSeconds(v)

Tests if given variable represents, or can be lossless converted to, seconds.

Syntax

bool ng_isSeconds (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can represent seconds.

ng_isMinutes

function ng_isMinutes(v)

Tests if given variable represents, or can be lossless converted to, minutes.

Syntax

bool ng_isMinutes (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can represent minutes.

ng_isHex

function ng_isHex(s)

Tests if given variable represents hexadecimal numbers.

Syntax

bool ng_isHex (mixed var)

Parameters

varvariable to test

Returns

TRUE if variable can represent hexadecimal numbers.

ng_isDigits

function ng_isDigits(s)

Tests if value of given variable contains only digits.

Syntax

bool ng_isDigits (mixed var)

Parameters

varvariable to test

Returns

TRUE if value of variable contains only digits

ng_isEmail

function ng_isEmail(s)

Tests if value of given variable is e-mail.

Syntax

bool ng_isEmail (mixed var)

Parameters

varvariable to test

Returns

TRUE if value is e-mail

ng_isURL

function ng_isURL(s)

Tests if value of given variable is URL.

Syntax

bool ng_isURL (mixed var)

Parameters

varvariable to test

Returns

TRUE if value is URL

ng_isWWW

function ng_isWWW(s)

Tests if value of given variable is web address.

Syntax

bool ng_isWWW (mixed var)

Parameters

varvariable to test

Returns

TRUE if value is web address

ng_isIP4

function ng_isIP4(s)

Tests if value of given variable is IP4 address.

Syntax

bool ng_isIP4 (mixed var)

Parameters

varvariable to test

Returns

TRUE if value is IP4 address

ng_isIP6

function ng_isIP6(s)

Tests if value of given variable is IP6 address.

Syntax

bool ng_isIP6 (mixed var)

Parameters

varvariable to test

Returns

TRUE if value is IP6 address

ng_isUnicode

function ng_isUnicode(s)

Tests if value of given variable is unicode string.

Syntax

bool ng_isUnicode (mixed var)

Parameters

varvariable to test

Returns

TRUE if value is unicode string

ng_isASCII

function ng_isASCII(s)

Tests if value of given variable is ASCII string.

Syntax

bool ng_isASCII (mixed var)

Parameters

varvariable to test

Returns

TRUE if value is a ASCII string

Conversions functions

ng_toBool

function ng_toBool(v)

Converts given variable to boolean.

Syntax

bool ng_toBool (mixed var)

Parameters

varvariable to convert

Returns

Converted value.

ng_toString

function ng_toString(v,
def)

Converts given variable to string.

Syntax

mixed ng_toBool (mixed var [,mixed def=’’])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toObject

function ng_toObject(v,
def)

Converts given variable to object.

Syntax

mixed ng_toObject (mixed var [,mixed def=null])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toNumber

function ng_toNumber(v,
def)

Converts given variable to number.

Syntax

mixed ng_toNumber (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toSByte

function ng_toSByte(v,
def)

Converts given variable to signed byte.

Syntax

mixed ng_toSByte (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toByte

function ng_toByte(v,
def)

Converts given variable to byte.

Syntax

mixed ng_toByte (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toShort

function ng_toShort(v,
def)

Converts given variable to short.

Syntax

mixed ng_toShort (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toUShort

function ng_toUShort(v,
def)

Converts given variable to unsigned short.

Syntax

mixed ng_toUShort (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toLong

function ng_toLong(v,
def)

Converts given variable to long.

Syntax

mixed ng_toLong (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toULong

function ng_toULong(v,
def)

Converts given variable to unsigned long.

Syntax

mixed ng_toULong (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toInteger

function ng_toInteger(v,
def)

Converts given variable to integer number.

Syntax

mixed ng_toInteger (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toFloat

function ng_toFloat(v,
def)

Converts given variable to float number.

Syntax

mixed ng_toFloat (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toDate

function ng_toDate(v,
def,
format)

Converts given variable to date object.

Syntax

mixed ng_toDate (mixed var [,mixed def=null, format=undefined])

Parameters

varvariable to convert
defdefault value, used if conversion fails
formatoptional parsing format

Returns

Converted value or default value if conversion fails.

ng_toDateOnly

function ng_toDateOnly(v,
def,
format)

Converts given variable to date object .

Syntax

mixed ng_toDateOnly (mixed var [,mixed def=null, format=undefined])

Parameters

varvariable to convert
defdefault value, used if conversion fails
formatoptional parsing format

Returns

Converted value or default value if conversion fails.

ng_toNVARCHAR

function ng_toNVARCHAR(v,
size,
def)

Converts given variable to NVARCHAR.

Syntax

mixed ng_toNVARCHAR (mixed var [, int size, mixed def=’’])

Parameters

varvariable to convert
sizeoptional size limit
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toDECIMAL

function ng_toDECIMAL(v,
digits,
frac_digits,
def)

Converts given variable to DECIMAL.

Syntax

mixed ng_toDECIMAL (mixed var, int digits, int frac_digits [,mixed def=NaN])

Parameters

varvariable to convert
digitstotal number of digits
frac_digitsnumber of digits in fraction part of number
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toUTCDate

function ng_toUTCDate(d,
def)

Converts given variable to UTC date.

Syntax

mixed ng_toUTCDate (mixed var [,mixed def=null])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_fromUTCDate

function ng_fromUTCDate(d,
def)

Converts given variable from UTC date.

Syntax

mixed ng_fromUTCDate (mixed var [,mixed def=null])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toUnixTimestamp

function ng_toUnixTimestamp(d,
def)

Converts given variable to UNIX timestamp.

Syntax

mixed ng_toUnixTimestamp (mixed var [,mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_fromUnixTimestamp

function ng_fromUnixTimestamp(d,
def)

Converts UNIX timestamp to date.

Syntax

mixed ng_fromUnixTimestamp (mixed var [,mixed def=null])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_formatDateISO8601

function ng_formatDateISO8601(d,
def)

Converts given variable to date string in ISO 8601 format.

Syntax

mixed ng_formatDateISO8601 (mixed var [, mixed def=’’])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_parseDateISO8601

function ng_parseDateISO8601(s,
def)

Converts given variable from date string in ISO 8601 format to date.

Syntax

mixed ng_parseDateISO8601 (mixed var [, mixed def=null])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_parseSIUnits

function ng_parseSIUnits(v,
units,
def,
allowedpref,
binary)

Converts given variable from string with SI units to number.

Syntax

mixed ng_parseSIUnits (mixed var, string units [, mixed def=NaN, mixed allowedpref, bool binary=false])

Parameters

varvariable to convert
unitsdimension units
defdefault value, used if conversion fails
allowedprefoptional list of allowed SI prefixes
binaryif TRUE, use binary exponents

Returns

Converted value or default value if conversion fails.

ng_formatSIUnits

function ng_formatSIUnits(v,
units,
def,
allowedpref,
precision,
formatfnc,
userdata,
binary)

Converts given variable to string followed by SI units.

Syntax

mixed ng_formatSIUnits (mixed var, string units [, mixed def=’’, mixed allowedpref, int precision, function formatfnc, mixed userdata, bool binary=false])

Parameters

varvariable to convert
unitsdimension units
defdefault value, used if conversion fails
allowedprefoptional list of allowed SI prefixes
precisionoptional required output number precision
formatfncoptional formating function callback
userdatauser data passed to formating function
binaryif TRUE, use binary exponents

Returns

Converted value or default value if conversion fails.

Callback

mixed function (number var,object si_def, string units, mixed def, array allowedpref, mixed userdata)

Returns formated value.

ng_parseBytes

function ng_parseBytes(v,
def)

Converts given variable from bytes with units to number.

Syntax

mixed ng_parseBytes (mixed var [, mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_formatBytes

function ng_formatBytes(v,
def,
precision,
formatfnc,
userdata)

Converts given variable to distance with units.

Syntax

mixed ng_formatBytes (mixed var [, mixed def=’’, int precision, function formatfnc, mixed userdata])

Parameters

varvariable to convert
defdefault value, used if conversion fails
precisionoptional required output number precision
formatfncoptional formating function callback
userdatauser data passed to formating function

Returns

Converted value or default value if conversion fails.

Callback

mixed function (number var,object si_def, string units, mixed def, array allowedpref, mixed userdata)

Returns formated value.

ng_parseDistance

function ng_parseDistance(v,
def)

Converts given variable from distance with units to number.

Syntax

mixed ng_parseDistance (mixed var [, mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_formatDistance

function ng_formatDistance(v,
def,
precision,
formatfnc,
userdata)

Converts given variable to distance with units.

Syntax

mixed ng_formatDistance (mixed var [, mixed def=’’, int precision, function formatfnc, mixed userdata])

Parameters

varvariable to convert
defdefault value, used if conversion fails
precisionoptional required output number precision
formatfncoptional formating function callback
userdatauser data passed to formating function

Returns

Converted value or default value if conversion fails.

Callback

mixed function (number var,object si_def, string units, mixed def, array allowedpref, mixed userdata)

Returns formated value.

ng_parseArea

function ng_parseArea(v,
def)

Converts given variable from area with units to number.

Syntax

mixed ng_parseArea (mixed var [, mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_formatArea

function ng_formatArea(v,
def,
precision,
formatfnc,
userdata)

Converts given variable to area with units.

Syntax

mixed ng_formatArea (mixed var [, mixed def=’’, int precision, function formatfnc, mixed userdata])

Parameters

varvariable to convert
defdefault value, used if conversion fails
precisionoptional required output number precision
formatfncoptional formating function callback
userdatauser data passed to formating function

Returns

Converted value or default value if conversion fails.

Callback

mixed function (number var,object si_def, string units, mixed def, array allowedpref, mixed userdata)

Returns formated value.

ng_parseSeconds

function ng_parseSeconds(v,
def)

Converts given variable from string time to number of seconds.

Syntax

mixed ng_parseSeconds (mixed var [, mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_formatSeconds

function ng_formatSeconds(v,
def,
ms)

Converts given variable from number of seconds to string time.

Syntax

mixed ng_formatSeconds (mixed var [, mixed def=’’])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_parseMinutes

function ng_parseMinutes(v,
def)

Converts given variable from string time to number of minutes.

Syntax

mixed ng_parseMinutes (mixed var [, mixed def=NaN])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_formatMinutes

function ng_formatMinutes(v,
def,
ms)

Converts given variable from number of minutes to string time.

Syntax

mixed ng_formatMinutes (mixed var [, mixed def=’’])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_formatWWW

function ng_formatWWW(s,
def)

Converts given variable to web address.

Syntax

mixed ng_formatWWW (mixed var [, mixed def=’’])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toASCII

function ng_toASCII(s,
def)

Converts given variable to ASCII string.

Syntax

mixed ng_toASCII (mixed var [, mixed def=’’])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toNonUnicode

function ng_toNonUnicode(s,
def)

Converts given variable to non-unicode string.

Syntax

mixed ng_toNonUnicode (mixed var [, mixed def=’’])

Parameters

varvariable to convert
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_toHex

function ng_toHex(v,
p,
def)

Converts given variable to hexadecimal.

Syntax

mixed ng_toHex (mixed var [, int padding, mixed def=’’])

Parameters

varvariable to convert
paddingsize of 0 padding
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

ng_Hex2Str

function ng_Hex2Str(v,
p,
def)

Decodes hexadecimal encoded string.

Syntax

mixed ng_Hex2Str (mixed var [, int padding, mixed def=’’])

Parameters

varvariable to convert
paddingsize of 0 padding
defdefault value, used if conversion fails

Returns

Converted value or default value if conversion fails.

Array functions

ng_idxInArray

function ng_idxInArray(value,
arr,
fromidx,
toidx,
cmpfnc,
userdata)

Finds given value in indexed array.

Syntax

int ng_idxInArray (mixed value, array arr [, int fromidx=0, int toidx=arr.length, function cmpfnc, mixed userdata])

Parameters

valuevalue to find
arrarray to scan
fromidxstart scan array from this index
toidxend scan array if reached to this index
cmdfnccompare function callback
userdatauser data passed to compare function

Returns

Index of value in array of -1 if value not found.

Callback

bool function (v1,v2,userdata)

Returns true if v1 is equal to v2.

ng_inArray

function ng_inArray(value,
arr,
fromidx,
toidx,
cmpfnc,
userdata)

Tests if given value is in indexed array.

Syntax

int ng_inArray (mixed value, array arr [, int fromidx=0, int toidx=arr.length, function cmpfnc, mixed userdata])

Parameters

valuevalue to find
arrarray to scan
fromidxstart scan array from this index
toidxend scan array if reached to this index
cmdfnccompare function callback
userdatauser data passed to compare function

Returns

TRUE if value is present in array.

Callback

bool function (v1,v2,userdata)

Returns true if v1 is equal to v2.

DateTime functions

ng_DefaultDateFormat

function ng_DefaultDateFormat(parse,
shortfmt)

Gets default date format according to selected language.

Syntax

string ng_DefaultDateFormat (bool parse [, bool shortfmt=false])

Parameters

parseif TRUE, return date and time format for parsing purposes.
shortfmtif TRUE, return date and time short format

Returns

Default date format.

See also

Format strings in ng_FormatDateTime.

ng_DefaultTimeFormat

function ng_DefaultTimeFormat(parse,
shortfmt)

Gets default time format according to selected language.

Syntax

string ng_DefaultTimeFormat (bool parse [, bool shortfmt=false])

Parameters

parseif TRUE, return date and time format for parsing purposes.
shortfmtif TRUE, return date and time short format

Returns

Default time format.

See also

Format strings in ng_FormatDateTime.

ng_DefaultDateTimeFormat

function ng_DefaultDateTimeFormat(parse,
shortfmt)

Gets default date and time format according to selected language.

Syntax

string ng_DefaultDateTimeFormat (bool parse [, bool shortfmt=false])

Parameters

parseif TRUE, return date and time format for parsing purposes.
shortfmtif TRUE, return date and time short format

Returns

Default date and time format.

See also

Format strings in ng_FormatDateTime.

ng_DateFormat

var ng_DateFormat

Gets default date format function.

Default value: ng_DefaultDateFormat

ng_TimeFormat

var ng_TimeFormat

Gets default time format function.

Default value: ng_DefaultTimeFormat

ng_DateTimeFormat

var ng_DateTimeFormat

Gets default date and time format function.

Default value: ng_DefaultDateTimeFormat

ng_ExtractDate

function ng_ExtractDate(dt)

Extracts date part from datetime variable.

Syntax

date ng_ExtractDate (date d)

Parameters

-

Returns

Date without time part.

ng_LeapYear

function ng_LeapYear(y)

Detects if year is a leap year.

Syntax

bool ng_LeapYear (int year)

Parameters

-

Returns

TRUE if year is a leap year.

ng_DaysInMonth

function ng_DaysInMonth(m,
y)

Determines number of days in month.

Syntax

bool ng_LeapYear (int month[, int year])

Parameters

-

Returns

Number of days.

ng_FormatTime

function ng_FormatTime(date,
format,
def)

Formats time to string.

Syntax

string ng_FormatTime (date d [, string format, mixed def])

Parameters

-

Returns

Formated time.

See also

Format strings in ng_FormatDateTime.

ng_FormatDate

function ng_FormatDate(date,
format,
def)

Formats date to string.

Syntax

string ng_FormatDate (date d [, string format, mixed def])

Parameters

ddate
formatformat string
defreturned value if d is not date

Returns

Formated date.

See also

Format strings in ng_FormatDateTime.

ng_FormatDateTime

function ng_FormatDateTime(date,
format,
def)

Formats date and time to string.

Syntax

string ng_FormatDateTime (date d [, string format, mixed def])

Parameters

ddate
formatformat string
defreturned value if d is not date

Format strings

yyyyyear (4 digits)
yyyear (2 digits)
yyear (2 or 4 digits)
MMmonth (2 digits)
Mmonth (1 or 2 digits)
MMMfull name of month
NNNshort name of month
dday of month (1 or 2 digits)
ddday of month (2 digits)
Eshort name of day of week
EEfull name of day of week
HHhour 0-23 (2 digits)
Hhour 0-23 (1 or 2 digits)
hhhour 1-12 (2 digits)
hhour 1-12 (1 or 2 digits)
kkhour 1-24 (2 digits)
khour 1-24 (1 or 2 digits)
KKhour 0-11 (2 digits)
Khour 0-11 (1 or 2 digits)
mmminute (2 digits)
mminute (1 or 2 digits)
sssecond (2 digits)
ssecond (1 or 2 digits)
umicrosecond
aAM/PM

Returns

Formated date and time.

ng_ParseTime

function ng_ParseTime(date,
format,
def)

Parses time from string.

Syntax

date ng_ParseTime (string s [, string format, mixed def])

Parameters

sstring to be parsed
formatformat string
defreturned value if d is not time

Returns

Parsed time.

See also

Format strings in ng_FormatDateTime.

ng_ParseDate

function ng_ParseDate(date,
format,
def)

Parses date from string.

Syntax

date ng_ParseDate (string s [, string format, mixed def])

Parameters

sstring to be parsed
formatformat string
defreturned value if d is not date

Returns

Parsed date.

See also

Format strings in ng_FormatDateTime.

ng_ParseDateTime

function ng_ParseDateTime(val,
format,
def)

Parses date and time from string.

Syntax

date ng_ParseDateTime (string s [, string format, mixed def])

Parameters

sstring to be parsed
formatformat string
defreturned value if d is not datetime

Returns

Parsed date and time.

See also

Format strings in ng_FormatDateTime.

ng_ParseJSONDateTime

function ng_ParseJSONDateTime(val,
def)

Parses date string formated by JSON encoder.

Syntax

date ng_ParseJSONDateTime (string s [ mixed def])

Parameters

sstring to be parsed
defreturned value if d is not datetime

Returns

Parsed date and time.

ng_GetDateFormat

function ng_GetDateFormat(val,
preferEuro)

Tries to figure out the date format from given text date.

Syntax

date ng_GetDateFormat (string s [, bool preferEuro=true])

Parameters

-

Returns

Date format.

See also

Format strings in ng_FormatDateTime.

String functions

ng_Trim

function ng_Trim(s)

Trims leading and trailing spaces.

Syntax

string ng_Trim (string s)

Parameters

sstring to be trimmed

Returns

Trimmed string.

ng_LTrim

function ng_LTrim(s)

Trims leading spaces.

Syntax

string ng_LTrim (string s)

Parameters

sstring to be trimmed

Returns

Trimmed string.

ng_RTrim

function ng_RTrim(s)

Trims trailing spaces.

Syntax

string ng_RTrim (string s)

Parameters

sstring to be trimmed

Returns

Trimmed string.

ng_StripPrefix

function ng_StripPrefix(v,
pref,
caseinsensitive)

Strips given prefix from a string.

Syntax

string ng_StripPrefix (string s, string prefix [, bool caseinsensitive=false])

Parameters

sstring
prefixprefix string
caseinsensitiveif TRUE, prefix is tested without case sensitivity

Returns

String without prefix.

ng_StripSuffix

function ng_StripSuffix(v,
suff,
caseinsensitive)

Strips given suffix from a string.

Syntax

string ng_StripSuffix (string s, string suffix [, bool caseinsensitive=false])

Parameters

sstring
suffixsuffix string
caseinsensitiveif TRUE, suffix is tested without case sensitivity

Returns

String without suffix.

ng_AddPrefix

function ng_AddPrefix(v,
pref,
caseinsensitive)

Adds given prefix to a string (if not already present).

Syntax

string ng_AddPrefix (string s, string prefix [, bool caseinsensitive=false])

Parameters

sstring
prefixprefix string
caseinsensitiveif TRUE, prefix is tested without case sensitivity

Returns

String with prefix.

ng_AddSuffix

function ng_AddSuffix(v,
suff,
caseinsensitive)

Adds given suffix to a string (if not already present).

Syntax

string ng_AddSuffix (string s, string suffix [, bool caseinsensitive=false])

Parameters

sstring
suffixsuffix string
caseinsensitiveif TRUE, suffix is tested without case sensitivity

Returns

String with suffix.

ng_AddSlash

function ng_AddSlash(v)

Adds slash ‘/’ to end of a string (if not already present).

Syntax

string ng_AddSlash (string s)

Parameters

sstring

Returns

String with slash ‘/’.

ng_StripSlash

function ng_StripSlash(v)

Strips slash ‘/’ from end of a string.

Syntax

string ng_StripSlash (string s)

Parameters

sstring

Returns

String without slash ‘/’.

ng_AddBackslash

function ng_AddBackslash(v)

Adds backslash ‘\’ to end of a string (if not already present).

Syntax

string ng_AddBackslash (string s)

Parameters

sstring

Returns

String with backslash ‘\’.

ng_StripBackslash

function ng_StripBackslash(v)

Strips backslash ‘\’ from end of a string.

Syntax

string ng_StripBackslash (string s)

Parameters

sstring

Returns

String without backslash ‘\’.

ng_StripQuotes

function ng_StripQuotes(v,
q)

Strips quotes from quoted string.

Syntax

string ng_StripQuotes (string s [, string quotestr])

Parameters

sstring
quotestroptional quote string definition, if not specified ‘ or “ is used

Returns

String without quotes.

ng_QuoteStr

function ng_QuoteStr(v,
q)

Adds quotes to string.

Syntax

string ng_QuoteStr (string s [, string quotestr])

Parameters

sstring
quotestroptional quote string definition, if not specified ‘ or “ is used

Returns

String with quotes.

ng_Unformat3Num

function ng_Unformat3Num(v,
sep)

Removes thousands separator from string.

Syntax

string ng_Unformat3Num (mixed var [, string separator=ngTxt(‘thousands_separator’)])

Parameters

varvariable to convert
separatorthousands separator

Returns

String without thousands separator.

ng_Format3Num

function ng_Format3Num(v,
sep,
rsep)

Adds thousands separator to string.

Syntax

string ng_Format3Num (mixed var [, string separator=ngTxt(‘thousands_separator’)])

Parameters

varvariable to convert
separatorthousands separator

Returns

String with thousands separator.

var ng_SIUnits
Definitions of SI units.
function ng_decodeSIUnits(units)
Decodes given units to units with exponent (square, quadratic).
function ng_CompareSIUnits(u1,
u2)
Compares two decoded units.
function ng_StripSIUnits(v,
units)
Strips units from given string.
function ng_getSIUnits(v,
units,
def)
Gets SI units definition from given string with units.
function ng_typeString(n)
Tests if type of given variable is a string.
function ng_typeNumber(n)
Tests if type of given variable is a number.
function ng_typeNumberInt(n)
Tests if type of given variable is an integer number.
function ng_typeNumberFloat(n)
Tests if type of given variable is a float number.
function ng_typeDate(d)
Tests if type of given variable is a date object.
function ng_typeObject(o)
Tests if type of given variable is a valid object.
function ng_typeArray(v)
Tests if type of given variable is an indexed array.
function ng_isEmpty(n)
Tests if given variable is undefined.
function ng_isNull(n)
Tests if given variable is Null.
function ng_isEmptyOrNull(n)
Tests if given variable is undefined or Null.
function ng_isInvalid(n)
Tests if given variable has invalid value according its type.
function ng_isNumber(v)
Tests if given variable is, or can be lossless converted to, a number.
function ng_isInteger(v)
Tests if given variable is, or can be lossless converted to, an integer number.
function ng_isFloat(v)
Tests if given variable is, or can be lossless converted to, a float number.
function ng_isSByte(v)
Tests if given variable is, or can be lossless converted to, a signed byte.
function ng_isByte(v)
Tests if given variable is, or can be lossless converted to, a byte.
function ng_isShort(v)
Tests if given variable is, or can be lossless converted to, a short.
function ng_isUShort(v)
Tests if given variable is, or can be lossless converted to, a unsigned short.
function ng_isLong(v)
Tests if given variable is, or can be lossless converted to, a long.
function ng_isULong(v)
Tests if given variable is, or can be lossless converted to, a unsigned long.
function ng_isDate(v,
format)
Tests if given variable is, or can be lossless converted to, a date object.
function ng_isNVARCHAR(v,
size)
Tests if given variable is, or can be lossless converted to, a NVARCHAR.
function ng_isDECIMAL(v,
digits,
frac_digits)
Tests if given variable is, or can be lossless converted to, a DECIMAL.
function ng_isDateISO8601(v)
Tests if given variable is, or can be lossless converted from, date string in ISO 8601 format.
function ng_isSIUnits(v,
units,
allowedpref)
Tests if given variable is, or can be lossless converted from, string with SI units.
function ng_isDistance(v)
Tests if given variable represents, or can be lossless converted to, a distance.
function ng_isArea(v)
Tests if given variable represents, or can be lossless converted to, an area.
function ng_isSeconds(v)
Tests if given variable represents, or can be lossless converted to, seconds.
function ng_isMinutes(v)
Tests if given variable represents, or can be lossless converted to, minutes.
function ng_isHex(s)
Tests if given variable represents hexadecimal numbers.
function ng_isDigits(s)
Tests if value of given variable contains only digits.
function ng_isEmail(s)
Tests if value of given variable is e-mail.
function ng_isURL(s)
Tests if value of given variable is URL.
function ng_isWWW(s)
Tests if value of given variable is web address.
function ng_isIP4(s)
Tests if value of given variable is IP4 address.
function ng_isIP6(s)
Tests if value of given variable is IP6 address.
function ng_isUnicode(s)
Tests if value of given variable is unicode string.
function ng_isASCII(s)
Tests if value of given variable is ASCII string.
function ng_toBool(v)
Converts given variable to boolean.
function ng_toString(v,
def)
Converts given variable to string.
function ng_toObject(v,
def)
Converts given variable to object.
function ng_toNumber(v,
def)
Converts given variable to number.
function ng_toSByte(v,
def)
Converts given variable to signed byte.
function ng_toByte(v,
def)
Converts given variable to byte.
function ng_toShort(v,
def)
Converts given variable to short.
function ng_toUShort(v,
def)
Converts given variable to unsigned short.
function ng_toLong(v,
def)
Converts given variable to long.
function ng_toULong(v,
def)
Converts given variable to unsigned long.
function ng_toInteger(v,
def)
Converts given variable to integer number.
function ng_toFloat(v,
def)
Converts given variable to float number.
function ng_toDate(v,
def,
format)
Converts given variable to date object.
function ng_toDateOnly(v,
def,
format)
Converts given variable to date object .
function ng_toNVARCHAR(v,
size,
def)
Converts given variable to NVARCHAR.
function ng_toDECIMAL(v,
digits,
frac_digits,
def)
Converts given variable to DECIMAL.
function ng_toUTCDate(d,
def)
Converts given variable to UTC date.
function ng_fromUTCDate(d,
def)
Converts given variable from UTC date.
function ng_toUnixTimestamp(d,
def)
Converts given variable to UNIX timestamp.
function ng_fromUnixTimestamp(d,
def)
Converts UNIX timestamp to date.
function ng_formatDateISO8601(d,
def)
Converts given variable to date string in ISO 8601 format.
function ng_parseDateISO8601(s,
def)
Converts given variable from date string in ISO 8601 format to date.
function ng_parseSIUnits(v,
units,
def,
allowedpref,
binary)
Converts given variable from string with SI units to number.
function ng_formatSIUnits(v,
units,
def,
allowedpref,
precision,
formatfnc,
userdata,
binary)
Converts given variable to string followed by SI units.
function ng_parseBytes(v,
def)
Converts given variable from bytes with units to number.
function ng_formatBytes(v,
def,
precision,
formatfnc,
userdata)
Converts given variable to distance with units.
function ng_parseDistance(v,
def)
Converts given variable from distance with units to number.
function ng_formatDistance(v,
def,
precision,
formatfnc,
userdata)
Converts given variable to distance with units.
function ng_parseArea(v,
def)
Converts given variable from area with units to number.
function ng_formatArea(v,
def,
precision,
formatfnc,
userdata)
Converts given variable to area with units.
function ng_parseSeconds(v,
def)
Converts given variable from string time to number of seconds.
function ng_formatSeconds(v,
def,
ms)
Converts given variable from number of seconds to string time.
function ng_parseMinutes(v,
def)
Converts given variable from string time to number of minutes.
function ng_formatMinutes(v,
def,
ms)
Converts given variable from number of minutes to string time.
function ng_formatWWW(s,
def)
Converts given variable to web address.
function ng_toASCII(s,
def)
Converts given variable to ASCII string.
function ng_toNonUnicode(s,
def)
Converts given variable to non-unicode string.
function ng_toHex(v,
p,
def)
Converts given variable to hexadecimal.
function ng_Hex2Str(v,
p,
def)
Decodes hexadecimal encoded string.
function ng_idxInArray(value,
arr,
fromidx,
toidx,
cmpfnc,
userdata)
Finds given value in indexed array.
function ng_inArray(value,
arr,
fromidx,
toidx,
cmpfnc,
userdata)
Tests if given value is in indexed array.
function ng_DefaultDateFormat(parse,
shortfmt)
Gets default date format according to selected language.
function ng_DefaultTimeFormat(parse,
shortfmt)
Gets default time format according to selected language.
function ng_DefaultDateTimeFormat(parse,
shortfmt)
Gets default date and time format according to selected language.
var ng_DateFormat
Gets default date format function.
var ng_TimeFormat
Gets default time format function.
var ng_DateTimeFormat
Gets default date and time format function.
function ng_ExtractDate(dt)
Extracts date part from datetime variable.
function ng_LeapYear(y)
Detects if year is a leap year.
function ng_DaysInMonth(m,
y)
Determines number of days in month.
function ng_FormatTime(date,
format,
def)
Formats time to string.
function ng_FormatDate(date,
format,
def)
Formats date to string.
function ng_FormatDateTime(date,
format,
def)
Formats date and time to string.
function ng_ParseTime(date,
format,
def)
Parses time from string.
function ng_ParseDate(date,
format,
def)
Parses date from string.
function ng_ParseDateTime(val,
format,
def)
Parses date and time from string.
function ng_ParseJSONDateTime(val,
def)
Parses date string formated by JSON encoder.
function ng_GetDateFormat(val,
preferEuro)
Tries to figure out the date format from given text date.
function ng_Trim(s)
Trims leading and trailing spaces.
function ng_LTrim(s)
Trims leading spaces.
function ng_RTrim(s)
Trims trailing spaces.
function ng_StripPrefix(v,
pref,
caseinsensitive)
Strips given prefix from a string.
function ng_StripSuffix(v,
suff,
caseinsensitive)
Strips given suffix from a string.
function ng_AddPrefix(v,
pref,
caseinsensitive)
Adds given prefix to a string (if not already present).
function ng_AddSuffix(v,
suff,
caseinsensitive)
Adds given suffix to a string (if not already present).
function ng_AddSlash(v)
Adds slash ‘/’ to end of a string (if not already present).
function ng_StripSlash(v)
Strips slash ‘/’ from end of a string.
function ng_AddBackslash(v)
Adds backslash ‘\’ to end of a string (if not already present).
function ng_StripBackslash(v)
Strips backslash ‘\’ from end of a string.
function ng_StripQuotes(v,
q)
Strips quotes from quoted string.
function ng_QuoteStr(v,
q)
Adds quotes to string.
function ng_Unformat3Num(v,
sep)
Removes thousands separator from string.
function ng_Format3Num(v,
sep,
rsep)
Adds thousands separator to string.
Close