Asc (Character Code)
Syntax: Asc(nChar)
Purpose: Returns the numerical character code corresponding to the given character.
Example:
_Print_Console(_Asc(
"Alpha"
))
-- returns 65
_Print_Console(_Asc(
"0"
))
-- returns 48
_Print_Console(_Asc(
"B"
))
-- returns 66
Chr (Character)
Syntax: Chr(Ascii_Number)
Purpose: Returns the character associated with the specified numerical character code.
Example
_Print_Console(_Chr(
65
))
-- returns "A"
_Print_Console(_Chr(
97
))
-- returns "a"
Convert_this_form_to_Latino ()
Syntax: Convert_this_form_to_Latino()
Purpose: Converts all buttons and labels on the current form to include Latin characters (tildes and ñ). Replaces the following combinations:
ae
io
un~
→ A
EI
OU
N~
Convert_to_Latino (Text Conversion)
Syntax: Convert_to_Latino(text_to_convert)
Purpose:
Converts
Latin character combinations (ae
io
u`n~
and their uppercase equivalents) within a string to letters with
tildes and ñ.
Currency_Format (Currency Formatting)
Syntax: Currency_Format(numeric_value_to_format)
Purpose: Formats a number as currency.
Cut_Left_String (Left-Side Removal)
Syntax: Cut_Left_String(String_Name, Token, Extra_Chars_To_Cut)
Purpose:
Removes
characters from the left side of String_Name
up
to and including the Token
and
Extra_Chars_To_Cut
.
The edited string is assigned back to String_Name
.
Parameters:
String_Name
:
The string to modify (must be enclosed in quotes).
Token
:
The character or substring marking the end of the cut.
Extra_Chars_To_Cut
:
Additional characters to remove after the token.
Returns:
true
if
successful, false
otherwise.
Example:
MyString =
"Hello, World!"
result = _Cut_Left_String(
"MyString"
,
","
,
" "
)
-- MyString now equals "World!"
Cut_Right_String (Right-Side Removal)
Syntax: Cut_Right_String(String_Name, Token, Extra_Chars_To_Cut)
Purpose:
Removes
characters from the right side of String_Name
up
to and including the first occurrence of Token
and
Extra_Chars_To_Cut
.
The edited string is assigned back to String_Name
.
Parameters:
String_Name
:
The string to modify (must be enclosed in quotes).
Token
:
The character or substring marking the start of the cut.
Extra_Chars_To_Cut
:
Additional characters to remove after the token.
Returns:
true
if
successful, false
otherwise.
Example:
MyString =
"Hello, World!"
result = _Cut_Right_String(
"MyString"
,
"o"
,
", "
)
-- MyString now equals "Hell"
Dollar_To_String (Number to Text)
Syntax: Dollar_To_String(nAmount)
Purpose: Converts a numerical amount into a written dollar format.
Example:
_Print_Console(_Dollar_To_String(
123.45
))
-- returns "one hundred twenty-three dollars and forty-five cents"
Ends (String Ending Check)
Syntax: Ends(s, suffix)
Purpose:
Checks
if a string (s
)
ends with a specific suffix. Returns true
if
it does, and false
if
not.
Example:
_Print_Console( _Ends(
"Test123"
,
"123"
) )
-- true
_Print_Console( _Ends(
"Test123"
,
"12"
) )
-- false
Explode (String Splitting)
Syntax: Explode(Data_to_Explode, Separator_Char, Name_of_Array_to_Create)
Purpose:
Splits
a string (Data_to_Explode
)
into an array (Name_of_Array_to_Create
)
using a specified separator (Separator_Char
).
Returns the number of elements in the new array.
Example:
n = _Explode(
"a|b|c|d"
,
"|"
,
"Params"
)
-- Creates array: Params[1]="a", Params[2]="b", Params[3]="c", Params[4]="d"
Explode_Trim (Splitting and Trimming)
Syntax: Explode_Trim(Data_to_Explode, Separator_Char, Name_of_Array_to_Create)
Purpose:
Similar
to Explode
,
but trims leading and trailing whitespace from each element before
placing it in the array.
Example:
n = _Explode_Trim(
"a| b |c| d "
,
"|"
,
"Params"
)
-- Creates array: Params[1]="a", Params[2]="b", Params[3]="c", Params[4]="d"
Instr (Substring Search)
Syntax: Instr(startPos, SearchString, string_find)
Purpose:
Finds
the starting position of a substring (string_find
)
within another string (SearchString
).
Begins the search at startPos
.
Returns the position if found, otherwise returns nil.
Example:
position = _Instr(
1
,
"alpha-centauro"
,
"-"
)
-- Returns 6 (position of the hyphen)
InstrRev (Reverse Substring Search)
Syntax: InstrRev(startPos, SearchString, string_find)
Purpose:
Like
Instr
,
but searches for the substring from the right side of the string
(from the end going towards the beginning).
Is_String (String Validation)
Syntax: Is_String(test_string)
Purpose:
Checks
if a given value (test_string
)
is a valid string. Returns true
if
it is, and false
if
not.
Lcase (Lowercase Conversion)
Syntax: Lcase(vString)
Purpose: Converts a string or character to lowercase.
Example:
_Print_Console(_Lcase(
"HeLlO WoRlD"
))
-- returns "hello world"
Left (Extract Leftmost Characters)
Syntax: Left(vString, nChar)
Purpose:
Extracts
a specified number of characters (nChar
)
from the left side of a string.
Example:
_Print_Console(_Left(
"Hello World"
,
5
))
-- returns "Hello"
Len (String Length)
Syntax: Len(vString)
Purpose: Returns the number of characters in a string.
Example:
length = _Len(
"Hello World"
)
_Print_Console(length)
-- returns 11
Lset (Left Alignment)
Syntax: Lset(string, nChar)
Purpose:
Pads
a string on the right with spaces until it reaches a specified
length (nChar
).
If the string is already longer than nChar
,
it will be truncated.
Example:
_Print_Console(_Lset(
"Hello"
,
10
))
-- returns "Hello "
Ltrim (Remove Leading Spaces)
Syntax: Ltrim(vString)
Purpose: Removes any leading spaces from a string.
Example:
_Print_Console(_Ltrim(
" Hello World"
))
-- returns "Hello World"
Mid (Substring Extraction)
Syntax: Mid(vString, from_nChar, nChar)
Purpose:
Extracts
a substring from a specified starting position (from_nChar
)
and with a specified length (nChar
).
Example:
_Print_Console(_Mid(
"Hello World"
,
7
,
5
))
-- returns "World"
Num_To_String (Number to Text)
Syntax: Num_To_String(nNumber)
Purpose: Converts a numerical value into text form (without "dollars").
Example:
_Print_Console(_Num_To_String(
123
))
-- returns "one hundred twenty-three"
Num_To_String_Th (Number to Text with "th")
Syntax: Num_To_String_Th(nNumber)
Purpose:
Similar
to Num_To_String
,
but adds the appropriate ordinal suffix ("st", "nd",
"rd", "th") to the end of the number.
Numeric_Comma_Value (Numeric Formatting)
Syntax: Numeric_Comma_Value(amount, digit_separator)
Purpose:
Formats
a number by inserting a digit separator (.
or
,
)
every three digits.
Example:
_Print_Console(_Numeric_Comma_Value(
1234567.89
,
"."
))
-- returns "1,234,567.89"
Numeric_Format (Precise Number Formatting)
Syntax: Numeric_Format(number, integerDigits, decimalDigits)
Purpose:
Formats
a number with the specified number of digits before (integerDigits
)
and after (decimalDigits
)
the decimal point.
Example:
_Print_Console(_Numeric_Format(
12.3456
,
2
,
3
))
-- returns "12.346"
RandomCod (Random Code Generator)
Syntax: RandomCod()
Purpose: Generates a random 6-character string consisting of uppercase letters with dashes between them.
Example:
_Print_Console(_RandomCod())
-- Might return something like "ABXNEO-JKLDAS"
Rep (String Repetition)
Syntax: Rep(s, n)
Purpose:
Creates
a new string by repeating a string (s
)
a specified number of times (n
).
Example:
_Print_Console(_Rep(
"Hello "
,
3
))
-- returns "Hello Hello Hello "
Replace (Substring Replacement)
Syntax: Replace(string1, string_find, string_repl)
Purpose:
Replaces
all occurrences of a substring (string_find
)
within another string (string1
)
with a replacement substring (string_repl
).
Example:
_Print_Console(_Replace(
"Hello World"
,
"World"
,
"Lua"
))
-- returns "Hello Lua"
Right (Extract Rightmost Characters)
Syntax: Right(vString, nChar)
Purpose:
Extracts
a specified number of characters (nChar
)
from the right side of a string.
Example:
_Print_Console(_Right(
"Hello World"
,
5
))
-- returns "World"
Rset (Right Alignment)
Syntax: Rset(string, nChar)
Purpose:
Pads
a string on the left with spaces until it reaches a specified length
(nChar
).
Rset_Zero (Right Alignment with Zero Padding)
Syntax: Rset_Zero(string, nChar)
Purpose:
Similar
to Rset
,
but pads the string with zeros on the left instead of spaces.
Rtrim (Remove Trailing Spaces)
Syntax: Rtrim(vString)
Purpose: Removes any trailing spaces from a string.
Space (Generate Spaces)
Syntax: Space(nChar)
Purpose:
Creates
a string consisting of a specified number (nChar
)
of spaces.
Starts (String Prefix Check)
Syntax: Starts(s, prefix)
Purpose:
Checks
if a string (s
)
starts with a specific prefix. Returns true
if
it does and false
if
not.
Str (Number to String Conversion)
Syntax: Str(nValue)
Purpose: Converts a number to a string.
Str_Reverse (String Reversal)
Syntax: Str_Reverse(string)
Purpose: Reverses the order of characters in a string.
String_to_NumericTable (String to Number Array)
Syntax: String_to_NumericTable(string_to_convert, factor)
Purpose: Converts a string of numbers separated by commas into a numeric array (table), optionally applying a multiplication factor.
String_to_Table (String to Array with Filtering)
Syntax: String_to_Table(string_to_convert, sepChar, match_content)
Purpose:
Converts
a string into an array (table), splitting based on a separator
(sepChar
)
and optionally filtering elements based on a pattern
(match_content
).
Trim (Remove Leading and Trailing Spaces)
Syntax: Trim(vString)
Purpose: Removes leading and trailing spaces from a string.
Truncate_Words (Limit String Words)
Syntax: Truncate_Words(anyString, nWords)
Purpose:
Returns
only the first nWords
from
a string.
Ucase (Uppercase Conversion)
Syntax: Ucase(vString)
Purpose: Converts a string or character to uppercase.