|
OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer
|
Functions | |
| isSmaller (s, t) | |
| Test if a string is smaller than another string. | |
| isLarger (s, t) | |
| Test if a string is larger than another string. | |
| suppDoublon (s1, s2) | |
| Test if a string is equal to another string. | |
| suppDoublonCaseSensivity (s1, s2) | |
| Test if a string is equal to another string case sensivity. | |
| getBooleanFromString (str) | |
| Get the boolean value of a string. | |
| isLastWordfromString (word, string) | |
| Compare the last word of a string. | |
| isFirstWordfromString (word, string) | |
| Compare the first word of a string. | |
| capitalizeFirstLetter (s) | |
| Make the first letter uppercase. | |
| strreplaceChar (s, from, to) | |
| Replace a string in an another string. | |
| strreplace (s, from, to) | |
| Replace a string in an another string. | |
| strreplacei (s, from, to) | |
| Replace a string in an another string, case insensivity. | |
| strToWordList (s) | |
| convert a string to a list of words | |
| replaceByKeyIndex (s, key, args) | |
| replace key by value position in arg list ("my string is $1 with $2" "val1"::"val2"::nil) | |
| replaceByKeyIndex2 (s, key, args) | |
| replace key by value position in arg list ("my string is $1 with $2" "val1 val2") | |
| strcatnSep (l, sep) | |
| Concat a string list with a defined separator. | |
| strcatnSepLimits (l, sep, nb) | |
| Concat a string list with a defined separator and limits. | |
| strcatnlSep (l, sep) | |
| Concat a string list with a defined separator and a line feed. | |
| addSlashes (s) | |
| Protect special character with a '\'. | |
| stripSlashes (s) | |
| Remove special character protection '\'. | |
| addChar (s, p, c) | |
| Protect char character with a char. | |
| stripChar (s, c) | |
| Remove special character protection '\'. | |
| strTruncate (s, maxlen, rp) | |
| Truncate a string. | |
| strQuote (s, q) | |
| Quote a string. | |
| listQuote (l, q) | |
| Quote a string list. | |
| strtrimChar (str, first, last) | |
| Remove spaces and first / last character of a string. | |
| strToList (s) | |
| Convert a String to a list of lines. | |
| strToQuotedList (s, c) | |
| Convert a String to a list of lines but protect line with char. | |
| oneLineTransform (s, sep) | |
| Change the line separation character. | |
| strToListSep (s, sep) | |
| Convert a string to a list by a defined separator. | |
| strToListOpenCloseSep (s, osep, csep) | |
| Convert a string to a list by a defined open / close separators. | |
| strToListSepCb (s, sep, cb) | |
| Convert a string to a list by a defined separator. | |
| strbuildn (l) | |
| Convert list of words and lines to a string. | |
| listToString (l) | |
| Convert list of lines to a string. | |
| isNumber (s) | |
| Check is a string is a number or a float. | |
| getNextToValue (cont, keyword) | |
| get the line after a keyword, for example "KEYWORD value" | |
| floatToString (float) | |
| transform a float into a clean readable string | |
| switchstrInv (l, s) | |
| invert switchstr parameter | |
| switchstriInv (l, s) | |
| invert switchstri parameter | |
| switchInv (l, s) | |
| invert switch parameter | |
String tools
| isSmaller | ( | s | , |
| t | |||
| ) |
Test if a string is smaller than another string.
Use with quicksort function
Prototype: fun [S S] I
| S | : first string to test |
| S | : second string to test |
| isLarger | ( | s | , |
| t | |||
| ) |
Test if a string is larger than another string.
Use with quicksort function 0 Prototype: fun [S S] I
| S | : first string to test |
| S | : second string to test |
| suppDoublon | ( | s1 | , |
| s2 | |||
| ) |
Test if a string is equal to another string.
Use with quicksort function
Prototype: fun [S S] I
| S | : first string to test |
| S | : second string to test |
| suppDoublonCaseSensivity | ( | s1 | , |
| s2 | |||
| ) |
Test if a string is equal to another string case sensivity.
Use with quicksort function
Prototype: fun [S S] I
| S | : first string to test |
| S | : second string to test |
| getBooleanFromString | ( | str | ) |
Get the boolean value of a string.
Prototype: fun [S] I
| S | : the boolean value "enable" "1" "on" "true" "yes" |
| isLastWordfromString | ( | word | , |
| string | |||
| ) |
Compare the last word of a string.
Prototype: fun [S S] I
| S | : the word to compare |
| S | : the full string |
| isFirstWordfromString | ( | word | , |
| string | |||
| ) |
Compare the first word of a string.
Prototype: fun [S S] I
| S | : the word to compare |
| S | : the full string |
| capitalizeFirstLetter | ( | s | ) |
Make the first letter uppercase.
Prototype: fun [S] S
| S | : the text |
| strreplaceChar | ( | s | , |
| from | , | ||
| to | |||
| ) |
Replace a string in an another string.
Prototype: fun [S S S] S
| S | : the string to change |
| I | : char to find |
| S | : the string to replace with |
| strreplace | ( | s | , |
| from | , | ||
| to | |||
| ) |
Replace a string in an another string.
Prototype: fun [S S S] S
| S | : the string to change |
| S | : the string to find |
| S | : the string to replace with |
| strreplacei | ( | s | , |
| from | , | ||
| to | |||
| ) |
Replace a string in an another string, case insensivity.
Prototype: fun [S S S] S
| S | : the string to change |
| S | : the string to find |
| S | : the string to replace with |
| strToWordList | ( | s | ) |
convert a string to a list of words
Prototype: fun [S] [S r1]
| S | : string |
| replaceByKeyIndex | ( | s | , |
| key | , | ||
| args | |||
| ) |
replace key by value position in arg list ("my string is $1 with $2" "val1"::"val2"::nil)
Prototype: fun [S S [S r1]] S
| S | : string |
| S | : the key "$" for example |
| [S | r1] : list of arguments |
| replaceByKeyIndex2 | ( | s | , |
| key | , | ||
| args | |||
| ) |
replace key by value position in arg list ("my string is $1 with $2" "val1 val2")
Prototype: fun [S S S] S
| S | : string |
| S | : the key "$" for example |
| S | : arguments |
| strcatnSep | ( | l | , |
| sep | |||
| ) |
Concat a string list with a defined separator.
Prototype: fun [[S r1] S] S
| [S | r1] : the string list |
| S | : the separator to use |
| strcatnSepLimits | ( | l | , |
| sep | , | ||
| nb | |||
| ) |
Concat a string list with a defined separator and limits.
Prototype: fun [[S r1] S I] S
| [S | r1] : the string list |
| S | : the separator to use |
| strcatnlSep | ( | l | , |
| sep | |||
| ) |
Concat a string list with a defined separator and a line feed.
Prototype: fun [[[S r1] r1] S] S
| [[S | r1] r1] : the string list |
| S | : the separator to use |
| addSlashes | ( | s | ) |
Protect special character with a '\'.
Prototype: fun [S] S
| S | : the string to protect |
| stripSlashes | ( | s | ) |
Remove special character protection '\'.
Prototype: fun [S] S
| S | : the string |
| addChar | ( | s | , |
| p | , | ||
| c | |||
| ) |
Protect char character with a char.
Prototype: fun [S I I] S
| S | : the string to protect |
| I | : char to protect |
| I | : char to add |
| stripChar | ( | s | , |
| c | |||
| ) |
Remove special character protection '\'.
Prototype: fun [S I] S
| S | : the string |
| I | : char to remove |
| strTruncate | ( | s | , |
| maxlen | , | ||
| rp | |||
| ) |
Truncate a string.
Prototype: fun [S I S] S
| S | : the string |
| I | : the maximun string length |
| S | : the string to add to the end (...) |
| strQuote | ( | s | , |
| q | |||
| ) |
Quote a string.
Prototype: fun [S S] S
| S | : the string |
| S | : the character to use for quotes '"' |
| listQuote | ( | l | , |
| q | |||
| ) |
Quote a string list.
Prototype: fun [[S r1] S] [S r1]
| [S | r1] : the string list |
| S | : the character to use for quotes '"' |
| strtrimChar | ( | str | , |
| first | , | ||
| last | |||
| ) |
Remove spaces and first / last character of a string.
Prototype: fun [S S S] S
| S | : the string |
| S | : the first character to remove |
| S | : the last character to remove |
| strToList | ( | s | ) |
Convert a String to a list of lines.
Prototype: fun [S] [S r1]
| S | : the string |
| strToQuotedList | ( | s | , |
| c | |||
| ) |
Convert a String to a list of lines but protect line with char.
Prototype: fun [S I] [S r1]
| S | : the string |
| I | : char condition |
| oneLineTransform | ( | s | , |
| sep | |||
| ) |
Change the line separation character.
Prototype: fun [S S] S
| S | : the string |
| S | : the line separation character |
| strToListSep | ( | s | , |
| sep | |||
| ) |
Convert a string to a list by a defined separator.
Prototype: fun [S S] [S r1]
| S | : the string |
| S | : separator ';' |
| strToListOpenCloseSep | ( | s | , |
| osep | , | ||
| csep | |||
| ) |
Convert a string to a list by a defined open / close separators.
Prototype: fun [S S S] [S r1]
| S | : the string |
| S | : open separator '[' |
| S | : close separator ']' |
| strToListSepCb | ( | s | , |
| sep | , | ||
| cb | |||
| ) |
Convert a string to a list by a defined separator.
Prototype: fun [S S fun [S] S] [S r1]
| S | : the string |
| S | : separator ';' |
| fun | [S] S : callback to modify the value |
| strbuildn | ( | l | ) |
Convert list of words and lines to a string.
Prototype: fun [[[S r1] r1]] S
| [[S | r1] r1] : list of words and lines |
| listToString | ( | l | ) |
Convert list of lines to a string.
Prototype: fun [[S r1]] S
| [S | r1] : list of lines |
| isNumber | ( | s | ) |
Check is a string is a number or a float.
Prototype: fun [S] I
| S | : string |
| getNextToValue | ( | cont | , |
| keyword | |||
| ) |
get the line after a keyword, for example "KEYWORD value"
Prototype: fun [S S] S
| S | : string |
| S | : keyword |
| floatToString | ( | float | ) |
transform a float into a clean readable string
Prototype: fun [F] S
| F | : float value |
| switchstrInv | ( | l | , |
| s | |||
| ) |
invert switchstr parameter
Prototype: fun [[u0 S] S] u0
| [u0 | S] : list |
| S | : value to get |
| switchstriInv | ( | l | , |
| s | |||
| ) |
invert switchstri parameter
Prototype: fun [[u0 S] S] u0
| [u0 | S] : list |
| S | : value to get |
| switchInv | ( | l | , |
| s | |||
| ) |
invert switch parameter
Prototype: fun [[u0 I] I] u0
| [u0 | I] : list |
| I | : value to get |