Trading Blox includes several different built-in functions to manipulate strings.

 

Parameter:

Description:

ASCII  & Asc

Returns the ASCII character code corresponding to the first letter in a string.

ASCIIToCharacters & Chr

Converts its parameters from integers to corresponding ASCII characters and returns the string composed of these characters.

AsString

(Type Conversion Function)

Converts a numeric expression and it assigns the result to a text variable.  

Optional [addCommas] parameter when set to True will add commas to the integer portion of a large number.

FindString  & Instr

Returns the position of the first occurrence of one string within another.

FormatString

Formats the number or string using the format string.

GetField

( Replaced: GetNumberField GetStringField )

This function will parse a comma delimited string and return the nth field.  Function will access both number and text character fields.  

 

NOTE:

GetStringField was previously required for text character fields, and GetNumberField was required for number fields before GetField was created to handle both data types.

GetFieldCount

This function returns the number of comma delimited values in a text string.

GetFieldNumber

This function returns the field number of a string.

LowerCase  & LCase

Converts any Upper-Case text characters to Lower-Case.

LeftCharacters  & Left

Returns a specified number of characters from the left-side of a string.

MiddleCharacters  & Mid

Returns a specified number of characters to copy from the middle of a string.

RemoveCommasBetweenQuotes

Removes the commas that are between quotes from an imported file record string.

RemoveNonDigits

Removes any characters that are not numbers from the string.

ReplaceString

Replaces text found in the search string with the text provided as a replacement text.

RightCharacters  & Right

Returns a specified number of characters from the right side of a string.

StringLength & Len

Returns the number of characters in a string text expression

TrimLeftSpaces  & LTrim

Returns a copy of the input string without the leading space characters.

TrimRightSpaces  & RTrim

Returns a copy of the input string without the trailing space characters.

TrimSpaces  & Trim

Returns a copy of the input string without the leading and trailing spaces.

UpperCase  & UCase

Returns Lower-Case text characters to Upper-Case in a string expression.

 

 

Example:

Note:

Note that to concatenate strings, the Plus ( + ) sign is used as follows:

 

string1 = "Hello"
string2 = "World"
resultString = string1 + string2
 
PRINT resultString           '

Results:

Prints "HelloWorld"

 

Links:

 

See Also:

Data Groups and Types

 


Edit Time: 9/18/2020 1:29:29 PM


Topic ID#: 588

 

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software