Aztec® Programming Language
Version 1.1 Alpha 2

Copyright © 2010-2017, Aztec Development Group, All Rights Reserved

Download Aztec

Search        Contact Us

Takes the wheel when I'm seeing double.

Pays my ticket... when I speed.

- Bob Weir and Robert Hunter

 

aztec.system.string

public class final string from<Base>

Base

string

The string class is a primitive class which represents a dynamic string object. The string object is treated as a value by default, and can be used directly in mathematical expressions and logical expressions, and string instance methods are avilable to modify the string value dynamically.

 

The maximum length of a single Aztec string object is 250 million characters.

 

The string instance methods, VM global methods and Compiler Methods can be used to perform a wide array of string and conversion operations. Each type of method has a separate column in the following method table with a link to the appropriate method description.

string Methods

Compiler
Global
Instance
Description
-
-
Constructor for the 'string' class to initialize with a string value
-
-
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
CompilerStrVerify() StrVerify() Verify() Verifies the string only contains characers from specified string and returns position if not
CompilerStrEncrypt() StrEncrypt() Encrypt() Encrypts the string with optional user keys and returns the result
CompilerStrDecrypt() StrDecrypt() Decrypt() Decrypts the (previously encrypted) string with optional user keys and returns the result
CompilerStrWhiteSpace() StrWhiteSpace() WhiteSpace() Returns true if the entire string contains only white space characters
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 250000000
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
string.SP string Space character

Derived Classes

See Also

 


string()

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, if the constructor arguments match this method. It is only available for dynamic allocation and not for initialization of string variables.

 

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


string()

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, if the constructor arguments match this method. It is only available for dynamic allocation and not for initialization of string variables.

 

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


string()

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, if the constructor arguments match this method. It is only available for dynamic allocation and not for initialization of string variables.

 

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


Ascii()

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


StrAscii()

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


CompilerStrAscii()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Int()

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


StrInt()

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


CompilerStrInt()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


ValidInt()

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


StrValidInt()

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


CompilerStrValidInt()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Float()

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


StrFloat()

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


CompilerStrFloat()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


ValidFloat()

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


StrValidFloat()

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


CompilerStrValidFloat()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Len()

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


StrLen()

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


CompilerStrLen()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Upr()

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


StrUpr()

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


CompilerStrUpr()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Lwr()

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


StrLwr()

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


CompilerStrLwr()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Comp()

public method<int> Comp(string Compare, bool CaseSensitive = true)

Parameters

Compare

String value to be compared to "Instance Value"

CaseSensitive

Comparison will be done case sensitive or case insensitive based on value of this flag (true by default)

Return Value

Returns 0 if the strings match, 1 if Instance Value is "greater than" Compare, and 2 if it is "less than" compare

Description

This instance method compares the incoming Compare string to the internal instance value, and returns the results. If the two strings match, the method returns 0. If the instance string is "greater than" the Compare string, the method returns 1, and it returns -1 if the Compare string is greater than the instance string.

 

string Class


StrComp()

public method<int> StrComp(string Value, string Compare, bool CaseSensitive = true)

Parameters

Value

String value to be part of the comparison

Compare

String value to be compared to "Instance Value"

CaseSensitive

Comparison will be done case sensitive or case insensitive based on value of this flag (true by default)

Return Value

Returns 0 if the strings match, 1 if "Value" is "greater than" Compare, and 2 if it is "less than" compare

Description

This global method compares the incoming Compare string to the Value string, and returns the results. If the two strings match, the method returns 0. If Value is "greater than" Compare, the method returns 1, and it returns -1 if Compare is greater than Value.

 

Global Method


CompilerStrComp()

public method<int> compiler CompilerStrComp(string Value, string Compare, bool CaseSensitive = true)

Parameters

Value

String value to be part of the comparison

Compare

String value to be compared to "Instance Value"

CaseSensitive

Comparison will be done case sensitive or case insensitive based on value of this flag (true by default)

Return Value

Returns 0 if the strings match, 1 if "Value" is "greater than" Compare, and 2 if it is "less than" compare

Description

This compiler method compares the incoming Compare string to the Value string, and returns the results. If the two strings match, the method returns 0. If Value is "greater than" Compare, the method returns 1, and it returns -1 if Compare is greater than Value.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Rev()

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 ("Abcde" becomes "edcbA").

 

string Class


StrRev()

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, front to back, and returns the result ("Abcde" becomes "edcbA"). This operation does not modify the source string object.

 

Global Method


CompilerStrRev()

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 ("Abcde" becomes "edcbA"). This operation does not modify the source string object.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Inc()

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


StrInc()

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


CompilerStrInc()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Add()

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


StrAdd()

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


CompilerStrAdd()

public method<string> compiler CompilerStrAdd(string ref Value1, string Value2)

Parameters

Value1

Reference to first string variable to be added

Value2

Second string value to be added

Return Value

Returns the addition of the two strings and also modifies first string.

Description

This compiler method adds the two strings together and returns the result. This operation also modifies the source string object with the result.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Pos()

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


StrPos()

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


CompilerStrPos()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Note that this method currently does not support searching backwards.

 

Compiler Method


Pad()

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


StrPad()

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


CompilerStrPad()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Fill()

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


StrFill()

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


CompilerStrFill()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

.

Compiler Method


Trim()

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


StrTrim()

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


CompilerStrTrim()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Sub()

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


StrSub()

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


CompilerStrSub()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Ins()

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


StrIns()

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


CompilerStrIns()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Ovr()

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


StrOvr()

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


CompilerStrOvr()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Del()

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


StrDel()

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


CompilerStrDel()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Verify()

public method<int> Verify(string TestCharacters)

Parameters

TestCharacters

String which contains set of "valid" characters

Return Value

Returns 0 if every character in internal instance Value is also contained in the TestCharacters string, and >1 represents one based position in instance string with first "noncomforming" character

Description

This instance method analyzes every character in the internal instance string value and verifies that each one exists in the TestCharacters string. If every character in the instance string passes the test, a value of zero is returned. If one or more characters do not pass the test, the method will return the one based position in the instance string value of the first nonconforming character.

 

string Class


StrVerify()

public method<int> StrVerify(string Value, string TestCharacters)

Parameters

Value

String value to be analyzed

TestCharacters

String which contains set of "valid" characters

Return Value

Returns 0 if every character in Value is also contained in the TestCharacters string, and >1 represents one based position in Value string with first "noncomforming" character

Description

This global method analyzes every character in the Value string and verifies that each one exists in the TestCharacters string. If every character in Value passes the test, a value of zero is returned. If one or more characters do not pass the test, the method will return the one based position in the Value string of the first nonconforming character.

 

Global Method


CompilerStrVerify()

public method<int> compiler CompilerStrVerify(string Value, string TestCharacters)

Parameters

Value

String value to be analyzed

TestCharacters

String which contains set of "valid" characters

Return Value

Returns 0 if every character in Value is also contained in the TestCharacters string, and >1 represents one based position in Value string with first "noncomforming" character

Description

This compiler method analyzes every character in the Value string and verifies that each one exists in the TestCharacters string. If every character in Value passes the test, a value of zero is returned. If one or more characters do not pass the test, the method will return the one based position in the Value string of the first nonconforming character.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Encrypt()

public method<string> Encrypt(int ApplicationKey = 0)

Parameters

ApplicationKey

Key that the caller of the method can pass in to further protect the contents (default of 0)

Return Value

Returns the encrypted string

Description

This instance method performs an internal encryption process on the string and returns the encrypted string to the caller. It also modifies the internal instance string with the same encrypted value.

 

Encryption is performed by an internal algorithm that is not RSA compatible, and Aztec Development Group does not guarantee its effectiveness. It is not intended for use with highly secret encryption requirements such as might be needed for military or government applications. This method is simply intended for situations where it is useful or necessary to prevent those who could potentially see the data from quickly knowing its contents. It would likely take an encryption expert a reasonable amount of time to break the code generated by the multi-level internal algorithm, and it would be mostly unbreakable by someone who is not an expert.

 

In addition to the internal default encryption which is performed, the user can optionally pass in an application key. The method performs further processing on the string given the application key, and it helps to protect the contents of the string further. The encrypted string cannot be successfully decrypted unless that same key is used..

 

Note that the same encryption/decryption process is used by the entire family of string encryption methods (Encrypt(), StrEncrypt(), CompilerStrEncrypt(), Decrypt(), StrDecrypt(), CompilerStrDecrypt()), so a string encrypted by any one of the encryption methods can be decrypted by any one of the decryption methoids, as long as the same application keys are used. A string can be encrypted during the compile process using CompilerStrEncrypt() and then decrypted at run-time using either Decrypt() or StrDecrypt().

 

string Class


StrEncrypt()

public method<string> StrEncrypt(string Value, int ApplicationKey = 0)

Parameters

Value

String value to be encrypted

ApplicationKey

Key that the caller of the method can pass in to further protect the contents (default of 0)

Return Value

Returns the encrypted string

Description

This global method performs an internal encryption process on the string and returns the encrypted string to the caller. It does not modify the original string Value.

 

Encryption is performed by an internal algorithm that is not RSA compatible, and Aztec Development Group does not guarantee its effectiveness. It is not intended for use with highly secret encryption requirements such as might be needed for military or government applications. This method is simply intended for situations where it is useful or necessary to prevent those who could potentially see the data from quickly knowing its contents. It would likely take an encryption expert a reasonable amount of time to break the code generated by the multi-level internal algorithm, and it would be mostly unbreakable by someone who is not an expert.

 

In addition to the internal default encryption which is performed, the user can optionally pass in an application key. The method performs further processing on the string given the application key, and it helps to protect the contents of the string further. The encrypted string cannot be successfully decrypted unless that same key is used..

 

Note that the same encryption/decryption process is used by the entire family of string encryption methods (Encrypt(), StrEncrypt(), CompilerStrEncrypt(), Decrypt(), StrDecrypt(), CompilerStrDecrypt()), so a string encrypted by any one of the encryption methods can be decrypted by any one of the decryption methoids, as long as the same application keys are used. A string can be encrypted during the compile process using CompilerStrEncrypt(), embedded in the executable byte code, and then decrypted at run-time using either Decrypt() or StrDecrypt().

 

Global Method


CompilerStrEncrypt()

public method<string> compiler CompilerStrEncrypt(string Value, int ApplicationKey = 0)

Parameters

Value

String value to be encrypted

ApplicationKey

Key that the caller of the method can pass in to further protect the contents (default of 0)

Return Value

Returns the encrypted string

Description

This compiler method performs an internal encryption process on the string and returns the encrypted string to the caller. It does not modify the original string Value.

 

Encryption is performed by an internal algorithm that is not RSA compatible, and Aztec Development Group does not guarantee its effectiveness. It is not intended for use with highly secret encryption requirements such as might be needed for military or government applications. This method is simply intended for situations where it is useful or necessary to prevent those who could potentially see the data from quickly knowing its contents. It would likely take an encryption expert a reasonable amount of time to break the code generated by the multi-level internal algorithm, and it would be mostly unbreakable by someone who is not an expert.

 

In addition to the internal default encryption which is performed, the user can optionally pass in an application key. The method performs further processing on the string given the application key, and it helps to protect the contents of the string further. The encrypted string cannot be successfully decrypted unless that same key is used..

 

Note that the same encryption/decryption process is used by the entire family of string encryption methods (Encrypt(), StrEncrypt(), CompilerStrEncrypt(), Decrypt(), StrDecrypt(), CompilerStrDecrypt()), so a string encrypted by any one of the encryption methods can be decrypted by any one of the decryption methoids, as long as the same application keys are used. A string can be encrypted during the compile process using CompilerStrEncrypt(), embedded in the executable byte code, and then decrypted at run-time using either Decrypt() or StrDecrypt().

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Decrypt()

public method<string> Decrypt(int ApplicationKey = 0)

Parameters

ApplicationKey

Key that the caller of the method can pass in to decrypt the string (default of 0)

Return Value

Returns the decrypted string

Description

This instance method performs an internal decryption process on the string (that has presumably already been encrypted using the same key that was passed in), and returns the decrypted string to the caller. It also modifies the internal instance string with the same decrypted value. It is important that the same application key be used for decryption that was used for the original encryption process of this string.

 

Please refer to the description in the "Encrypt()" family of methods for more details, but encryption and decryption are performed by an internal algorithm that is not RSA compatible, and Aztec Development Group does not guarantee its effectiveness.

 

Note that the same encryption/decryption process is used by the entire family of string encryption methods (Encrypt(), StrEncrypt(), CompilerStrEncrypt(), Decrypt(), StrDecrypt(), CompilerStrDecrypt()), so a string encrypted by any one of the encryption methods can be decrypted by any one of the decryption methoids, as long as the same application keys are used. A string can be encrypted during the compile process using CompilerStrEncrypt() and then decrypted at run-time using either Decrypt() or StrDecrypt().

 

string Class


StrDecrypt()

public method<string> StrDecrypt(string Value, int ApplicationKey = 0)

Parameters

Value

(Encrypted) String value to be decrypted

ApplicationKey

Key that the caller of the method can pass in to decrypt the string (default of 0)

Return Value

Returns the decrypted string

Description

This global method performs an internal decryption process on the string (that has presumably already been encrypted using the same key that was passed in), and returns the decrypted string to the caller. It does not modify the original (encrypted) string Value. It is important that the same application key be used for decryption that was used for the original encryption process of this string.

 

Please refer to the description in the "Encrypt()" family of methods for more details, but encryption and decryption are performed by an internal algorithm that is not RSA compatible, and Aztec Development Group does not guarantee its effectiveness.

 

Note that the same encryption/decryption process is used by the entire family of string encryption methods (Encrypt(), StrEncrypt(), CompilerStrEncrypt(), Decrypt(), StrDecrypt(), CompilerStrDecrypt()), so a string encrypted by any one of the encryption methods can be decrypted by any one of the decryption methoids, as long as the same application keys are used. A string can be encrypted during the compile process using CompilerStrEncrypt() and then decrypted at run-time using either Decrypt() or StrDecrypt().

 

Global Method


CompilerStrDecrypt()

public method<string> compiler CompilerStrDecrypt(string Value, int ApplicationKey = 0)

Parameters

Value

(Encrypted) String value to be decrypted

ApplicationKey

Key that the caller of the method can pass in to decrypt the string (default of 0)

Return Value

Returns the encrypted string

Description

This compiler method performs an internal decryption process on the string (that has presumably already been encrypted using the same key that was passed in), and returns the decrypted string to the caller. It does not modify the original (encrypted) string Value. It is important that the same application key be used for decryption that was used for the original encryption process of this string.

 

Please refer to the description in the "Encrypt()" family of methods for more details, but encryption and decryption are performed by an internal algorithm that is not RSA compatible, and Aztec Development Group does not guarantee its effectiveness.

 

Note that the same encryption/decryption process is used by the entire family of string encryption methods (Encrypt(), StrEncrypt(), CompilerStrEncrypt(), Decrypt(), StrDecrypt(), CompilerStrDecrypt()), so a string encrypted by any one of the encryption methods can be decrypted by any one of the decryption methoids, as long as the same application keys are used. A string can be encrypted during the compile process using CompilerStrEncrypt() and then decrypted at run-time using either Decrypt() or StrDecrypt().

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


WhiteSpace()

public method<bool> WhiteSpace()

Parameters

None

Return Value

Returns true if all characters in the string are white space characters, and false if one or more characters are not white space

Description

This instance method analyzes every character in the internal instance string value and verifies that each one is a white space character. The following table defines the characters that are considered white space.

Aztec White Space Character Constants

 

The method returns true only if all characters in the instance string are also in this white space list. If one or more characters are not white space as defined in this table, the method will return false.

 

string Class


StrWhiteSpace()

public method<bool> StrWhiteSpace(string Value)

Parameters

Value

String value to be analyzed

Return Value

Returns true if all characters in the string are white space characters, and false if one or more characters are not white space

Description

This global method analyzes every character in "Value" and verifies that each one is a white space character. The table of valid white space characters is shown in the above "WhiteSpace()" instance method. The method returns true only if all characters in the string are also in this white space list. If one or more characters are not white space as defined in this table, the method will return false.

 

Global Method


CompilerStrWhiteSpace()

public method<bool> compiler CompilerStrWhiteSpace(string Value)

Parameters

Value

String value to be analyzed

Return Value

Returns true if all characters in the string are white space characters, and false if one or more characters are not white space

Description

This compiler method analyzes every character in "Value" and verifies that each one is a white space character. The table of valid white space characters is shown in the above "WhiteSpace()" instance method. The method returns true only if all characters in the string are also in this white space list. If one or more characters are not white space as defined in this table, the method will return false.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


NumTokens()

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


StrNumTokens()

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


CompilerStrNumTokens()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Token()

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


StrToken()

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


CompilerStrToken()

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.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Tokens()

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


StrTokens()

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

 

Copyright © 2010-2017

Aztec Development Group

All Rights Reserved

Download Aztec