Functions dealing with strings.
Capitalizes the first letter of a string.
A new string with the first letter capitalized.
<str>
Formats an array of strings into columns of specified widths. ie:
ColumnFormat "%%%\n" #("One","Two","Three") #(2,4,1)
will print:
OnTwo T
OK.
<formatString>
Format()
function.
<args>
<argsCnt>
args
array. Each args[x] will be expanded or shortened to argsCnt[x] number of characters.
Takes a date returned by the "localTime" global variable or external file date functions and returns a point3 in the form [dd,mm,yyyy].
A point3 in the form [dd,mm,yyyy].
<localTimeString>
Takes a date returned by the "localTime" global variable or external file date functions and returns the number of seconds past midnight.
The number of seconds past midnight for the given day in the passed date string, as an integer.
<localTimeString>
Similar to findString(), but with three new optional parameters (from, to, and caseSensitive).
Leaving the new parameters off will cause findString2() to work just like findString().
The index of the first letter of the found string, or undefined if not found.
<str>
<searchString>
[fromIndex:1]
[lengthIndex:0]
[caseSensitive:false]
Returns a number as a string, padded out with zeros to a minimum of characters.
The original number padded out with leading zeros, or the original number as a string if the size is already greater than the minimum.
<num>
<minSize>
Searches for the first tag in a string, surrounded by <* and *>.
An array containing #(int,int,string)
array[1] is the starting character of the tag (including the starting <*)
array[2] is the length of the tag (including the start <* and end *>)
array[3] is the tag name, not including the <* *>)
example: getTag "this is a test <*TAGHERE*> string"
returns: #(16,11,"TAGHERE")
<str>
<startIdx>
Checks if a single character can be converted to an int.
True if the character can be converted to an int, otherwise false.
<char>
Prints a string in the color specified to the listener.
Note: This function is fairly limited.
The string printed.
<str>
<colorValue>
Replaces tags in a string with specified values.
Allows batches of tags to be replaced quickly within text. ie:
replacetags "This is <*aTag*> <*bTag*>" #(#aTag,#bTag) #("foo","bar")
returns:
"This is foo bar"
The passed string with the tags replaced. Any unknown tags are replaced with the string "UNKNOWNTAG".
<str>
<tagArray>
<tagValArray>
Replaces parts of a string with a new string.
The passed string with any matching parts replaced.
<str>
<searchString>
<replaceString>
[fromIndex:1]
[lengthIndex:0]
[caseSensitive:false]
Shorten a string to n characters, removing characters from the middle and inserting a single "~" in place. ie:
SnipString "ThisIsAReallyLongName" 10
returns:
"ThisI~Name"
The passed string shortened to "maxLength" characters.
<str>
<maxLength>
Counts how many times a string is found in another string.
An integer count of how many times the string was found, or 0 if not found.
<str>
<findStr>
Convert a string to all lower case.
The passed string converted to all lower case letters.
<str>
Convert a string to all upper case.
The passed string converted to all lower upper case letters.
<str>
Truncate a string to n characters.
The passed string with the trailing characters snipped off.
<str>
<maxLength>