
public class final string from<Base>
string
string Methods
Compiler |
Global |
Instance |
Description |
- |
- |
string() |
Constructor for the 'string' class to initialize with a string value |
- |
- |
string() |
Constructor for the 'string' class to initialize with an int value |
| - | - | string() | Constructor for the 'string' class to initialize with a float value |
| CompilerStrAscii() | StrAscii() | Ascii() | Returns the ASCII decimal vallue associated with first character in the string |
| CompilerStrInt() | StrInt() | Int() | Converts the string to an integer and returns the result |
| CompilerStrValidInt() | StrValidInt() | ValidInt() | Returns true if the entire string is a valid integer |
| CompilerStrFloat() | StrFloat() | Float() | Converts the string to a floating point number and returns the result |
| CompilerStrValidFloat() | StrValidFloat() | ValidFloat() | Returns true if the entire string is a valid floating point number |
| Returns the length of the string | |||
| Converts the string to upper case and returns the result | |||
| Converts the string to lower case and returns the result | |||
| CompilerStrComp() | StrComp() | Comp() | Compares one string to another (with or without case sensitive) and returns integer result |
| CompilerStrRev() | StrRev() | Rev() | Reverses the characters in the string from front to back and returns the result |
| CompilerStrInc() | StrInc() | Inc() | Increments the last character in the string and returns the result |
| CompilerStrAdd() | StrAdd() | Add() | Adds a specified string to the string object and returns the result |
| CompilerStrPos() | StrPos() | Pos() | Searches for string at specified start position and returns one based position |
| CompilerStrPad() | StrPad() | Pad() | Pads the string to specified length using pad character and justification |
| CompilerStrFill() | StrFill() | Fill() | Fills the string with specified string and repeat count |
| CompilerStrTrim() | StrTrim() | Trim() | Trims leading and/or trailing spaces from string and returns result |
| CompilerStrSub() | StrSub() | Sub() | Extracts substring from the string and returns result |
| CompilerStrIns() | StrIns() | Ins() | Inserts a specified string into the string and returns the result |
| CompilerStrOvr() | StrOvr() | Ovr() | Overlays a specified string onto the string and returns the result |
| CompilerStrDel() | StrDel() | Del() | Deletes a substring from the string and returns the result |
| CompilerStrRep() | StrRep() | Rep() | Replaces a substring with another string for specified number of times and returns result |
| CompilerStrVer() | StrVer() | Ver() | Verifies the string only contains characers from specified string and returns position if not |
| CompilerStrNumTokens() | StrNumTokens() | NumTokens() | Returns number of tokens in the string given set of delimiters |
| CompilerStrToken() | StrToken() | Token() | Returns a specific token from the string given set of delimiters |
| - | StrTokens() | Tokens() | Returns array of tokens given set of delimiters |
string Constants
| Constant Data Item | Data Type | Value |
| string.MaxLength | int | 268435456 |
| string.PadLeft | int | 1 |
| string.PadCenter | int | 2 |
| string.PadRight | int | 3 |
| string.HT | string | Horizontal tab character |
| string.LF | string | Line feed character |
| string.VT | string | Vertical tab character |
| string.FF | string | Form feed character |
| string.CR | string | Carriage return character |
Derived Classes
NONE
See Also
Class Hierarchy, Primitive Framework, int, float, bool, Enumerations
public method string(string InitValue = "")
Parameters
InitValue
Initial value for the string object, with a default of an empty string.
Return Value
None
Description
This is one of the constructors for the 'string' class, invoked automatically by the VM during dynamic allocation of a string object or for initialization of local, global or shared data items, if a constructor was used in the data definition.
This particular constructor takes a string as a parameter to initialize the object. An empty string is used if the parameter is not provided.
string Class
public method string(int InitValue, string Format = "I")
Parameters
InitValue
Initial value specified as an integer
Format
Format string to control size and value of the string with a default of "I"
Return Value
None
Description
This is one of the constructors for the 'string' class, invoked automatically by the VM during dynamic allocation of a string object and for initialization of local, global or shared data items, if a constructor was used in the data definition.
This particular constructor takes an int as a parameter for initialization. The integer is converted to a string based on the format string and is used to initialize the new string object. The int to string conversion follows the same rules as the 'int.Str()' instance method.
string Class
public method string(float InitValue, string Format = "F.2")
Parameters
InitValue
Initial value specified as a floating point number
Format
Format string to control size and value of the string with a default of "F.2"
Return Value
None
Description
This is one of the constructors for the 'string' class, invoked automatically by the VM during dynamic allocation of a string object and for initialization of local, global or shared data items, if a constructor was used in the data definition.
This particular constructor takes a floating point value as a parameter for initialization. The float is converted to a string based on the format string and is used to initialize the new string object. The float to string conversion follows the same rules as the 'float.Str()' instance method.
string Class
public method<int> Ascii()
Parameters
None
Return Value
Returns the ASCII decimal value of string
Description
This instance method returns the ASCII decimal value of the first character in the internal string object (0-255). It will return zero if the string has a length of zero.
string Class
public method<int> StrAscii(string Value)
Parameters
Value
String containing character to convert to ASCII
Return Value
Returns the ASCII decimal value of string
Description
This global method returns the ASCII decimal value of the first character in the specified string (0-255). It will return zero if the string has a length of zero.
Global Method
public method<int> compiler CompilerStrAscii(string Value)
Parameters
Value
String containing character to convert to ASCII
Return Value
Returns the ASCII decimal value of string
Description
This compiler method returns the ASCII decimal value of the first character in the specified string (0-255). It will return zero if the string has a length of zero.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<int> Int()
Parameters
None
Return Value
Returns integer from string conversion
Description
This instance method converts the internal string object into an integer and returns the value. Leading and trailing spaces are ignored. If the entire string is a single, valid integer, the conversion is performed and the value returned. If the entire string is not a valid integer, a value of zero is returned. The internal string object is not modified by this method.
string Class
public method<int> StrInt(string Value)
Parameters
Value
String to be converted to an integer
Return Value
Returns integer from string conversion
Description
This global method converts the specified string value into an integer and returns the value. Leading and trailing spaces are ignored. If the entire string is a single, valid integer, the conversion is performed and the value returned. If the entire string is not a valid integer, a value of zero is returned.
Global Method
public method<int> compiler CompilerStrInt(string Value)
Parameters
Value
String to be converted to an integer
Return Value
Returns integer from string conversion
Description
This compiler method converts the specified string value into an integer and returns the value. Leading and trailing spaces are ignored. If the entire string is a single, valid integer, the conversion is performed and the value returned. If the entire string is not a valid integer, a value of zero is returned.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<bool> ValidInt()
Parameters
None
Return Value
Returns true if string is a valid integer
Description
This instance method attempts to convert the internal string object into an integer and returns true if it's a valid integer and false if it's not valid. Leading and trailing spaces are ignored.
string Class
public method<bool> StrValidInt(string Value)
Parameters
Value
String to be tested as a valid integer
Return Value
Returns true if string is a valid int
Description
This global method attempts to convert the specified string value into an integer and returns true if it's a valid integer and false if it's not valid. Leading and trailing spaces are ignored.
Global Method
public method<bool> compiler CompilerStrValidInt(string Value)
Parameters
Value
String to be tested as a valid integer
Return Value
Returns true if string is a valid int
Description
This compiler method attempts to convert the specified string value into an integer and returns true if it's a valid integer and false if it's not valid. Leading and trailing spaces are ignored.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<float> Float()
Parameters
None
Return Value
Returns floating point number from string conversion
Description
This instance method converts the internal string object into a floating point number and returns the value. Leading and trailing spaces are ignored. If the entire string is a single, valid float, the conversion is performed and the value returned. If the entire string is not a valid float, a value of zero is returned. The internal string object is not modified by this method.
string Class
public method<float> StrFloat(string Value)
Parameters
Value
String to be converted to a float
Return Value
Returns floating point number from string conversion
Description
This global method converts the specified string value into a floating point number and returns the value. Leading and trailing spaces are ignored. If the entire string is a single, valid float, the conversion is performed and the value returned. If the entire string is not a valid float, a value of zero is returned.
Global Method
public method<float> compiler CompilerStrFloat(string Value)
Parameters
Value
String to be converted to a float
Return Value
Returns floating point number from string conversion
Description
This compiler method converts the specified string value into a floating point number and returns the value. Leading and trailing spaces are ignored. If the entire string is a single, valid float, the conversion is performed and the value returned. If the entire string is not a valid float, a value of zero is returned.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<bool> ValidFloat()
Parameters
None
Return Value
Returns true if string is a valid floating point number
Description
This instance method attempts to convert the internal string object into a floating point number and returns true if it's a valid float and false if it's not valid. Leading and trailing spaces are ignored.
string Class
public method<bool> StrValidFloat(string Value)
Parameters
Value
String to be tested as a valid float
Return Value
Returns true if string is a valid floating point number
Description
This global method attempts to convert the specified string value into a floating point number and returns true if it's a valid float and false if it's not valid. Leading and trailing spaces are ignored.
Global Method
public method<bool> compiler CompilerStrValidFloat(string Value)
Parameters
Value
String to be tested as a valid float
Return Value
Returns true if string is a valid floating point number
Description
This compiler method attempts to convert the specified string value into a floating point number and returns true if it's a valid float and false if it's not valid. Leading and trailing spaces are ignored.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<int> Len()
Parameters
None
Return Value
Returns the length of the string
Description
This instance method returns the length of the internal string value as an integer
string Class
public method<int> StrLen(string Value)
Parameters
string
String value to get length of
Return Value
Returns the length of the string
Description
This global method returns the length of the specified string as an integer
Global Method
public method<int> compiler CompilerStrLen(string Value)
Parameters
string
String value to get length of
Return Value
Returns the length of the string
Description
This compiler method returns the length of the specified string as an integer.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Upr()
Parameters
None
Return Value
Returns the upper case version of the string
Description
This instance method converts the internal string value to upper case and returns the result.
string Class
public method<string> StrUpr(string Value)
Parameters
Value
String value to be converted to upper case
Return Value
Returns the upper case version of the string
Description
This global method converts the specified string value to upper case and returns the result. This operation does not modify the source string object.
Global Method
public method<string> compiler CompilerStrUpr(string Value)
Parameters
Value
String value to be converted to upper case
Return Value
Returns the upper case version of the string
Description
This compiler method converts the specified string value to upper case and returns the result. This operation does not modify the source string object.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Lwr()
Parameters
None
Return Value
Returns the lower case version of the string
Description
This instance method converts the internal string value to lower case and returns the result.
string Class
public method<string> StrLwr(string Value)
Parameters
Value
String value to be converted to lower case
Return Value
Returns the lower case version of the string
Description
This global method converts the specified string value to lower case and returns the result. This operation does not modify the source string object.
Global Method
public method<string> compiler CompilerStrLwr(string Value)
Parameters
Value
String value to be converted to lower case
Return Value
Returns the lower case version of the string
Description
This compiler method converts the specified string value to lower case and returns the result. This operation does not modify the source string object.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Rev()
Parameters
None
Return Value
Returns the reverse of the string
Description
This instance method reverses the characters within the internal string and returns the result.
string Class
public method<string> StrRev(string Value)
Parameters
Value
String value to be reversed
Return Value
Returns the reverse of the string
Description
This global method reverses the characters in the specified string value and returns the result. This operation does not modify the source string object.
Global Method
public method<string> compiler CompilerStrRev(string Value)
Parameters
Value
String value to be reversed
Return Value
Returns the reverse of the string
Description
This compiler method reverses the characters in the specified string value and returns the result. This operation does not modify the source string object.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Inc()
Parameters
None
Return Value
Returns the string value after the increment
Description
This instance method increments the last character in the string and returns the result. This method modifies the internal string object.
The increment operation takes the last character in the string, and it increments the associated decimal value. It operates on a single byte, and will only perform the operation if the decimal value is less than 255. It does not wrap around to zero, and no overflow exception is fired.
This method is primarily intended for a string of length one (emulating a 'character' data type), allowing a loop to be easily driven by a range of characters ( for ( Char = 'A' ; Char <= 'Z' ; Char.Inc() ) { } )".
string Class
public method<string> StrInc(string Value)
Parameters
Value
String value to be incremented
Return Value
Returns the value of the incremented string
Description
This global method increments the last character in the specified string and returns the result. This operation does not modify the source string object.
The increment operation takes the last character in the string, and it increments the associated decimal value. It operates on a single byte, and will only perform the operation if the decimal value is less than 255. It does not wrap around to zero, and no overflow exception is fired.
Global Method
public method<string> compiler CompilerStrInc(string Value)
Parameters
Value
String value to be incremented
Return Value
Returns the value of the incremented string
Description
This compiler method increments the last character in the specified string and returns the result. This operation does not modify the source string object.
The increment operation takes the last character in the string, and it increments the associated decimal value. It operates on a single byte, and will only perform the operation if the decimal value is less than 255. It does not wrap around to zero.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Add(string Value)
Parameters
Value
String value to be added to the string
Return Value
Returns the string value after source string is added
Description
This instance method adds the specified source string to the internal source value and returns the result. This method modifies the internal string object.
string Class
public method<string> StrAdd(string Value1, string Value2)
Parameters
Value1
First string value to be added
Value2
Second string value to be added
Return Value
Returns the addition of the two strings
Description
This global method adds the two strings together and returns the result. This operation does not modify the source string object.
This method emulates the '+' operator, and is included mainly for consistency and completeness.
Global Method
public method<string> compiler CompilerStrAdd(string Value1, string Value2)
Parameters
Value1
First string value to be added
Value2
Second string value to be added
Return Value
Returns the addition of the two strings
Description
This compiler method adds the two strings together and returns the result. This operation does not modify the source string object.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
This method emulates the '+' operator, and is included mainly for consistency and completeness.
Compiler Method
public method<int> Pos(string SearchValue, int StartPos = 1, bool SearchForward = true)
Parameters
SearchValue
String value to be searched for
StartPos
One based position within the string to start the search
SearchForward
Indicates direction of search (true for forward)
Return Value
Returns the one based position of the matching substring, 0 if no match
Description
This instance method searches within the internal string for the specified search value. The one based starting position and the search direction can also be specified. It returns the one based position within the string where a match is found, otherwise it returns zero.
Note that this method currently does not support searching backwards.
string Class
public method<int> StrPos(string BaseValue, string SearchValue, int StartPos = 1, bool SearchForward = true)
Parameters
BaseValue
Base string where the search occurs
SearchValue
String value to be searched for
StartPos
One based position within the string to start the search
SearchForward
Indicates direction of search (true for forward)
Return Value
Returns the addition of the two strings
Description
This global method searches within the specified string for the specified search value. The one based starting position and the search direction can also be specified. It returns the one based position within the string where a match is found, otherwise it returns zero.
Note that this method currently does not support searching backwards.
Global Method
public method<int> compiler CompilerStrPos(string BaseValue, string SearchValue, int StartPos = 1, bool SearchForward = true)
Parameters
BaseValue
Base string where the search occurs
SearchValue
String value to be searched for
StartPos
One based position within the string to start the search
SearchForward
Indicates direction of search (true for forward)
Return Value
Returns the addition of the two strings
Description
This compiler method searches within the specified string for the specified search value. The one based starting position and the search direction can also be specified. It returns the one based position within the string where a match is found, otherwise it returns zero.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Note that this method currently does not support searching backwards.
Compiler Method
public method<string> Pad(int Length,string PadStr = ' ',int Justification = string.PadLeft)
Parameters
Length
Final length after padding operation
PadStr
String to be used for padding
Justification
Value specifying how the string is justified - left, center or right
Return Value
Returns the padded string value
Description
This instance method pads the internal string value within the specified length using the pad string and the justification. This method modifies the internal string object.
The pad string can be one or more characters, and will be repeated to fill up the specified length. Valid justification values are string.PadLeft, string.PadCenter and string.PadRight.
string Class
public method<string> StrPad(string Value,int Length,string PadStr = ' ',int Justification = string.PadLeft)
Parameters
Value
String to be padded
Length
Final length after padding operation
PadStr
String to be used for padding
Justification
Value specifying how the string is justified - left, center or right
Return Value
Returns the padded string value
Description
This global method pads the specified string value within the specified length using the pad string and the justification. This method does not modify the internal string object.
The pad string can be one or more characters, and will be repeated to fill up the specified length. Valid justification values are string.PadLeft, string.PadCenter and string.PadRight.
Global Method
public method<string> compiler CompilerStrPad(string Value,int Length,string PadStr = ' ',int Justification = string.PadLeft)
Parameters
Value
String to be padded
Length
Final length after padding operation
PadStr
String to be used for padding
Justification
Value specifying how the string is justified - left, center or right
Return Value
Returns the padded string value
Description
This compiler method pads the specified string value within the specified length using the pad string and the justification. This method does not modify the internal string object.
The pad string can be one or more characters, and will be repeated to fill up the specified length. Valid justification values are string.PadLeft, string.PadCenter and string.PadRight.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Fill(string FillStr,int RepeatCount)
Parameters
FillStr
The string to be repeated to fill up the internal string object
RepeatCount
Number of times the FillStr is repeated
Return Value
Returns the resulting filled string
Description
This instance method fills the internal string with the value specified by FillStr and RepeatCount specifies how many times it is repeated. The length of the resulting string will be the length of FillStr times the repeat count. This method modifies the internal string object.
string Class
public method<string> StrFill(string FillStr,int RepeatCount)
Parameters
FillStr
The string to be repeated to fill up the return string
RepeatCount
Number of times the FillStr is repeated
Return Value
Returns the resulting filled string
Description
This global method returns a string filled with the value specified by FillStr and RepeatCount specifies how many times it is repeated. The length of the resulting string will be the length of FillStr times the repeat count.
Global Method
public method<string> compiler CompilerStrFill(string FillStr,int RepeatCount)
Parameters
FillStr
The string to be repeated to fill up the return string
RepeatCount
Number of times the FillStr is repeated
Return Value
Returns the resulting filled string
Description
This compiler method returns a string filled with the value specified by FillStr and RepeatCount specifies how many times it is repeated. The length of the resulting string will be the length of FillStr times the repeat count.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression
.
Compiler Method
public method<string> Trim(bool TrimLeading = true, bool TrimTrailing = true)
Parameters
TrimLeading
Trim the leading spaces from the string if true
TrimTrailing
Trim the trailing spaces from the string if true
Return Value
Returns the resulting trimmed string
Description
This instance method trims leading and/or trailing spaces from the string and returns the result. A separate argument is used to indicate whether leading and trailing spaces will be trimmed. The default value is true for both arguments. This method modifies the internal string object.
string Class
public method<string> StrTrim(string Value, bool TrimLeading = true, bool TrimTrailing = true)
Parameters
Value
String value to be trimmed
TrimLeading
Trim the leading spaces from the string if true
TrimTrailing
Trim the trailing spaces from the string if true
Return Value
Returns the resulting trimmed string
Description
This global method trims leading and/or trailing spaces from the string and returns the result. A separate argument is used to indicate whether leading and trailing spaces will be trimmed. The default value is true for both arguments. This method does not modify the string object.
Global Method
public method<string> compiler CompilerStrTrim(string Value, bool TrimLeading = true, bool TrimTrailing = true)
Parameters
Value
String value to be trimmed
TrimLeading
Trim the leading spaces from the string if true
TrimTrailing
Trim the trailing spaces from the string if true
Return Value
Returns the resulting trimmed string
Description
This compiler method trims leading and/or trailing spaces from the string and returns the result. A separate argument is used to indicate whether leading and trailing spaces will be trimmed. The default value is true for both arguments. This method does not modify the string object.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Sub(int StartPos, int NumCharacters = 1)
Parameters
StartPos
One based starting position within the string
NumCharacters
Number of characters to extract, with a default of one
Return Value
Returns the extracted substring
Description
This instance method extracts a substring from the internal string object and returns it. The one based starting position is passed in as well as the number of characters to extract (default of one). If NumCharacters is zero, it extracts all the way to the end of string. This method does not modify the internal string object.
string Class
public method<string> StrSub(string Value, int StartPos, int NumCharacters = 1)
Parameters
Value
String to extract a sub string from
StartPos
One based starting position within the string
NumCharacters
Number of characters to extract, with a default of one
Return Value
Returns the extracted substring
Description
This global method extracts a substring from the string object and returns it. The one based starting position is passed in as well as the number of characters to extract (default of one). If NumCharacters is zero, it extracts all the way to the end of string. This method does not modify the string object.
Global Method
public method<string> compiler CompilerStrSub(string Value, int StartPos, int NumCharacters = 1)
Parameters
Value
String to extract a sub string from
StartPos
One based starting position within the string
NumCharacters
Number of characters to extract, with a default of one
Return Value
Returns the extracted substring
Description
This compiler method extracts a substring from the string object and returns it. The one based starting position is passed in as well as the number of characters to extract (default of one). If NumCharacters is zero, it extracts all the way to the end of string. This method does not modify the string object.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Ins(string InsertValue, int InsertPos)
Parameters
InsertValue
String value to be inserted
InsertPos
One based insert position
Return Value
Returns the string result after insertion
Description
This instance method inserts a specified string value into the internal string object and returns it. The one based insert position is passed in. The string will be inserted before this specified position. If the insert position is greater than the length of the internal string object, spaces will be used to pad the internal string object out to that position, and then the insert string is appended to the end. This method modifies the internal string object.
string Class
public method<string> StrIns(string Value, string InsertValue, int InsertPos)
Parameters
Value
Starting string value before insertion
InsertValue
String value to be inserted
InsertPos
One based insert position
Return Value
Returns the string result after insertion
Description
This global method inserts a specified string InsertValue into the string Value passed in and returns it. The one based insert position is also passed in. The string will be inserted before this specified position. If the insert position is greater than the length of the string value, spaces will be used to pad the string value out to that position, and then the insert string is appended to the end. This method does not modify the string value.
Global Method
public method<string> compiler CompilerStrIns(string Value, string InsertValue, int InsertPos)
Parameters
Value
Starting string value before insertion
InsertValue
String value to be inserted
InsertPos
One based insert position
Return Value
Returns the string result after insertion
Description
This compiler method inserts a specified string InsertValue into the string Value passed in and returns it. The one based insert position is also passed in. The string will be inserted before this specified position. If the insert position is greater than the length of the string value, spaces will be used to pad the string value out to that position, and then the insert string is appended to the end. This method does not modify the string value.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Ovr(string OverlayValue, int InsertPos)
Parameters
OverlayValue
String value to be overlayed
InsertPos
One based overlay position
Return Value
Returns the string result after the overlay
Description
This instance method overlays a specified string value onto the internal string object and returns it. The one based starting position for the overlay operation is passed in. If the overlay position is greater than the length of the internal string object, spaces will be used to pad the internal string object out to that position, and then the overlay string is appended to the end. This method modifies the internal string object.
string Class
public method<string> StrOvr(string Value, string OverlayValue, int OverlayPos)
Parameters
Value
Starting string value before overlay
OverlayValue
String value to be overlayed
OverlayPos
One based overlay position
Return Value
Returns the string result after overlay
Description
This global method overlays a specified string value onto the string value passed in and returns it. The one based starting position for the overlay operation is passed in. If the overlay position is greater than the length of the internal string object, spaces will be used to pad the internal string object out to that position, and then the overlay string is appended to the end. This method does not modify the string value.
Global Method
public method<string> compiler CompilerStrOvr(string Value, string OverlayValue, int OverlayPos)
Parameters
Value
Starting string value before overlay
OverlayValue
String value to be overlayed
OverlayPos
One based overlay position
Return Value
Returns the string result after overlay
Description
This compiler method overlays a specified string value onto the string value passed in and returns it. The one based starting position for the overlay operation is passed in. If the overlay position is greater than the length of the internal string object, spaces will be used to pad the internal string object out to that position, and then the overlay string is appended to the end. This method does not modify the string value.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Del(int StartPos, int NumCharacters = 1)
Parameters
StartPos
One based starting position within the string
NumCharacters
Number of characters to delete, with a default of one
Return Value
Returns the string result after the delete operation
Description
This instance method deletes a substring from within the internal string object and returns it. The one based starting position for the delete operation is passed in, as well as the number of characters to delete, with a default of one. If the starting position is greater than the length of the internal string object, nothing is deleted. If NumCharacters is zero, it deletes all the way to the end of the string. This method modifies the internal string object.
string Class
public method<string> StrDel(string Value, int StartPos, int NumCharacters = 1)
Parameters
Value
Starting string value before the delete
StartPos
One based starting position within the string
NumCharacters
Number of characters to delete, with a default of one
Return Value
Returns the string result after the delete operation
Description
This global method deletes a substring from the specified string value and returns it. The one based starting position for the delete operation is passed in, as well as the number of characters to delete, with a default of one. If the starting position is greater than the length of the string value, nothing is deleted. If NumCharacters is zero, it deletes all the way to the end of the string. This method does not modify the string value.
Global Method
public method<string> compiler CompilerStrDel(string Value, int StartPos, int NumCharacters = 1)
Parameters
Value
Starting string value before the delete
StartPos
One based starting position within the string
NumCharacters
Number of characters to delete, with a default of one
Return Value
Returns the string result after the delete operation
Description
This compiler method deletes a substring from the specified string value and returns it. The one based starting position for the delete operation is passed in, as well as the number of characters to delete, with a default of one. If the starting position is greater than the length of the string value, nothing is deleted. If NumCharacters is zero, it deletes all the way to the end of the string. This method does not modify the string value.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<int> NumTokens(string Delimiter = " ")
Parameters
Delimiter
Delimiter string to drive token parsing
Return Value
Returns the number of tokens in the string
Description
This instance method parses the internal string object based on the delimiter characters present in the delimiter string and returns the number of tokens. A single space is the default for the delimiter string. Spaces are treated specially in the parsing logic. One or more spaces together will be treated as a single delimiter, whereas other delimiter characters will not be treated this way. Each instance of the delimiter character "|" in the string will be treated as a separate delimiter.
string Class
public method<int> StrNumTokens(string Value, string Delimiter = " ")
Parameters
Value
String value to be parsed
Delimiter
Delimiter string to drive token parsing
Return Value
Returns the number of tokens in the string
Description
This global method parses the specified string value based on the delimiter characters present in the delimiter string and returns the number of tokens. A single space is the default for the delimiter string. Spaces are treated specially in the parsing logic. One or more spaces together will be treated as a single delimiter, whereas other delimiter characters will not be treated this way. Each instance of the delimiter character "|" in the string will be treated as a separate delimiter.
Global Method
public method<int> CompilerStrNumTokens(string Value, string Delimiter = " ")
Parameters
Value
String value to be parsed
Delimiter
Delimiter string to drive token parsing
Return Value
Returns the number of tokens in the string
Description
This compiler method parses the specified string value based on the delimiter characters present in the delimiter string and returns the number of tokens. A single space is the default for the delimiter string. Spaces are treated specially in the parsing logic. One or more spaces together will be treated as a single delimiter, whereas other delimiter characters will not be treated this way. Each instance of the delimiter character "|" in the string will be treated as a separate delimiter.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string> Token(int Index, string Delimiter = " ")
Parameters
Index
One based index of the token to retrieve
Delimiter
Delimiter string to drive token parsing
Return Value
Returns the specified token extracted from the string
Description
This instance method parses the internal string object based on the delimiter characters present in the delimiter string and returns the token specified by the one based index. Same parsing logic as the NumTokens() method.
string Class
public method<string> StrToken(string Value, int Index, string Delimiter = " ")
Parameters
Value
String value to be parsed
Index
One based index of the token to retrieve
Delimiter
Delimiter string to drive token parsing
Return Value
Returns the number of tokens in the string
Description
This global method parses the string value based on the delimiter characters present in the delimiter string and returns the token specified by the one based index. Same parsing logic as the NumTokens() method.
Global Method
public method<string> compiler CompilerStrToken(string Value, int Index, string Delimiter = " ")
Parameters
Value
String value to be parsed
Index
One based index of the token to retrieve
Delimiter
Delimiter string to drive token parsing
Return Value
Returns the number of tokens in the string
Description
This compiler method parses the string value based on the delimiter characters present in the delimiter string and returns the token specified by the one based index. Same parsing logic as the NumTokens() method.
This method can be used dynamically during the compile process at the module level, class level and inside compiler methods. It can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.
Compiler Method
public method<string[ ]> Tokens(string Delimiter = " ")
Parameters
Delimiter
Delimiter string to drive token parsing
Return Value
Returns array of tokens parsed from the string
Description
This instance method parses the internal string object based on the delimiter characters present in the delimiter string and returns an array of strings containing each of the tokens. The string is dynamically created and its size is the number of tokens from the string. Same parsing logic as the NumTokens() method.
string Class
public method<string[ ]> StrTokens(string Value, string Delimiter = " ")
Parameters
Value
String value to be parsed
Delimiter
Delimiter string to drive token parsing
Return Value
Returns array of tokens parsed from the string
Description
This global method parses the specified string value based on the delimiter characters present in the delimiter string and returns an array of strings containing each of the tokens. The string is dynamically created and its size is the number of tokens from the string. Same parsing logic as the NumTokens() method.
Global Method