Handy utility functions. More...
Static Public Member Functions | |
_.Library.String | Center (_.Library.String str, _.Library.Integer width) |
Handy utility functions. More... | |
_.Library.String | Date (_.Library.Integer Format) |
Show the date, for example. More... | |
_.Library.String | DateTime (_.Library.Integer Format) |
Show date and time, for example: More... | |
_.Library.String | FormatMB (_.Library.Float val) |
Used for formatting database and global sizes in MB. More... | |
_.Library.String | FormatReference (_.Library.String reference, _.Library.Integer Flags, _.Library.Boolean overflow) |
FormatReference performs the same operations as FormatString, except the input is. More... | |
_.Library.String | FormatString (_.Library.String string, _.Library.Integer Flags, _.Library.Boolean overflow) |
Format a string, replacing unprintable characters with $C(nn) and showing. More... | |
_.Library.Integer | Replace (_.Library.String Source, _.Library.String FindWhat, _.Library.String ReplaceWith, _.Library.Boolean MatchCase, _.Library.String OutputString, _.Library.Integer Start, _.Library.Integer RepeatCount, _.Library.Integer StartMode) |
Searches in Source the occurrences of FindWhat and replaces them with ReplaceWith. More... | |
_.Library.String | Time () |
Show the time, for example. More... | |
Handy utility functions.
|
static |
Handy utility functions.
Center text on a line
|
static |
Show the date, for example.
Sep 26 2003
|
static |
Show date and time, for example:
Sep 26 2003 5:39 PM
|
static |
Used for formatting database and global sizes in MB.
Returns a minimum of two significant digits
|
static |
FormatReference performs the same operations as FormatString, except the input is.
a local or global variable reference, in $NAME() format, and the formatting is applied separately to each subscript value.
|
static |
Format a string, replacing unprintable characters with $C(nn) and showing.
$Lists with $LB(). $Bit strings are shown with $C() or $ZWC() and with a comment indicating which bits are set. Status values are shown with $LB() and a comment describing the error.
Flags contains these options:
1 - Do the formatting with $C(), $LB(), and $ZWC(). If this bit is not set, the string is returned unchanged. The formatted value may be used in a SET command to reproduce the string.
2 - Add escape sequences to make the added formatting characters Bold.
4 - Write the formatted string to the current output device.
8 - Do not add a comment to $BIT() strings and Status values.
The overflow argument is set to 1 if the formatted string has to be truncated because it is too long for a local variable.
|
static |
Searches in Source the occurrences of FindWhat and replaces them with ReplaceWith.
The Search will be case insensitive if MatchCase=0 (default = 1).
The result of the operation will be placed in OutputString.
The method returns the number of times the replacement occurred.
You can also specify a starting point for the search (Start) and how many occurrences of
FindWhat you want replaced (default: 0 = All).
If FindWhat is the empty string, no replacement occurs. StartMode specifies how the Start parameter works. If StartMode=0, Start is a character count like in $Find. If StartMode=1, Start is a FindWhat count. That is, replacing starts at the beginning of the Start-th piece delimited by FindWhat. If Start<0, the find/replace operation works backwards from the end of the string. If Start is passed byref, return value of Start is where next search of the same line should start from, i.e. 1 character after the last replace.
|
static |
Show the time, for example.
6:33 PM