JavaScript String related methods
Methods
-
staticDuString.args(string, args){string}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4597 -
Replaces all occurences of "{#}" in the string by the args.
Name Type Description stringstring The original string argsArray.<string> | string The arguments Returns:
Type Description string The new string -
staticDuString.endsWith(str, suffix){bool}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4620 -
Checks if a string ends with a given suffix
Name Type Description strstring The string to check suffixstring The suffix Returns:
Type Description bool Whether the string ends with the given suffix or not -
staticDuString.fromSize(size){string}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4735 -
Converts a size in Bytes to a human-readable string with a fitting unit automatically chosen
Note that the conversion uses 1024 Bytes per kB.Name Type Description sizeint The size in Bytes Returns:
Type Description string The stringified size -
staticDuString.fullTrim(str){String}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4723 -
Returns a copy of the string without leading and trailing white spaces, and without any new line, leaving only standard spaces.
Name Type Description strstring The string to trim Returns:
Type Description String The trimmed string -
staticDuString.generateUnique(newString, stringList, increment, isFile){string}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4633 -
Generates a new unique string (numbered)
Name Type Default Description newStringstring The wanted new string stringListArray.<string> The list of strings where the new one must be generateUnique incrementboolean true optional true to automatically increment the new name if it already ends with a digit isFileboolean false optional when generating name for files, setting this to true will add the increment before the extension Returns:
Type Description string The unique string, with a new number at the end if needed. -
staticDuString.leftTrim(str){String}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4703 -
Returns a copy of the string without leading white spaces.
Name Type Description strstring The string to trim Returns:
Type Description String The trimmed string -
staticDuString.occurences(string, item){int}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4544 -
Counts the number of occurences of item in string
Name Type Description stringstring The string where to count itemstring the string to search Returns:
Type Description int the number of occurences -
staticDuString.parseBool(string, caseSensitive){boolean}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4559 -
Parses the string as a boolean.
The following strings are falsy:
'false', '0', '', 'null', 'undefined', 'NaN'.
Note that any string consisiting only in any number of 0 will be falsy.Name Type Default Description stringstring The string to parse caseSensitiveboolean true optional When false, 'FALSE', 'nan', 'UNdefined'... for example will be falsy too. Returns:
Type Description boolean The resulting boolean -
staticDuString.replace(string, find, replace, caseSensitive){string}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4583 -
Replaces all occurences of a substring by another and returns the new string.
Name Type Default Description stringstring The original string findstring The substring to replace replacestring The new substring to insert caseSensitiveboolean true optional Optionnal. Do a case sensitive search of substring. Returns:
Type Description string The new string -
staticDuString.rightTrim(str){String}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4713 -
Returns a copy of the string without trailing white spaces.
Name Type Description strstring The string to trim Returns:
Type Description String The trimmed string -
staticDuString.trim(str){String}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 4693 -
Returns a copy of the string without leading and trailing white spaces.
Name Type Description strstring The string to trim Returns:
Type Description String The trimmed string