Text

Top  Previous  Next

 

This category includes any functions related to manipulating text value types, for instance to extract parts of a text string.

 

 

 

(Back to Function Types List)

 

 

 

Function:ANSItoOEM        
Result-type:Text        
Arguments:cText        
Description:Convert ANSI cText to OEM characters        

 

 

Function:AppendFile        
Result-type:Boolean        
Arguments:cFile, cText        
Description:Appends the contents of a text string to a file (after any existing contents). Note that newline characters in the text are written as carriage return-linefeed pairs. The file must already exist. The filename parameter can either have a complete path or just a filename -- if just a filename, it must be in the same folder as the current database.        

 

 

Function:Asc        
Result-type:Numeric        
Arguments:cCharacter        
Description:Converts a single character to its numeric (ASCII) value. Example: 'A' -> 65        

 

 

Function:Between        
Result-type:Boolean        
Arguments:eTest, eFirst, eLast        
Description:Returns TRUE if eTest is between eFirst and eLast, non-inclusive -- e.g. Between(2, 2, 3) would return False because 2 is not greater than 2. Arguments can be text, numbers, dates, or boolean (but must all be the same type)        

 

 

Function:C        
Result-type:Text        
Arguments:eExpression        
Description:Forces an 'Unknown' expression to look like a text expression -- it won't necessarily do conversion, it's simply used to satisfy argument type verifications where a function is used that returns an 'Unknown' type inside a function that requires a 'cText' argument        

 

 

Function:Chr        
Result-type:Text        
Arguments:nValue        
Description:Converts a value into its character equivalent (e.g. ASCII). Example: 65 -> 'A'        

 

 

Function:ChrTran        
Result-type:Text        
Arguments:cText, cToReplace, cReplaceWith        
Description:Translates cText : replaces any cToReplace characters found in cText with corresponding characters in cReplaceWith        

 

 

Function:Currency        
Result-type:Text        
Arguments:nValue        
Description:Converts a numeric value into currency text. Example: 3.5 -> '$3.50'        

 

 

Function:        CurrencyTextToValue        

Result-type:        Numeric        

Arguments:        cText        

Description:        Converts a text currency value to a numeric value. Example: '$3.50' -> 3.5        

 

 

Function:Empty        
Result-type:Boolean        
Arguments:eExpression        
Description:Returns TRUE if the argument is an empty text string, 0 value, invalid date, or FALSE boolean value        

 

 

Function:FieldText        
Result-type:Text        
Arguments:rRecord, cFieldName        
Description:Gets the text for the given field of a record. Will return an empty string if the field is not normally a text value        

 

 

Function:Find        
Result-type:Numeric        
Arguments:cSearchText, cTextToFind [, nOccurrence]        
Description:Searches cSearchText for cTextToFind (case sensitive), returns the position where it's found (0 if not found), or the position of the nth occurrence if nOccurrence is specified        

 

 

Function:FindNoCase        
Result-type:Numeric        
Arguments:cSearchText, cTextToFind [, nOccurrence]        
Description:Searches cSearchText for cTextToFind (case insensitive), returns the position where it's found (0 if not found), or the position of the nth occurrence if nOccurrence is specified        

 

 

Function:FindOneOf        
Result-type:Numeric        
Arguments:cSearchText, cCharactersToFind [, nOccurrence]        
Description:Searches cSearchText for any one of the characters in cCharactersToFind (case sensitive), returns the position of the first found (0 if not found), or the position of the nth occurrence if nOccurrence is specified        

 

 

Function:FindOneOfNoCase        
Result-type:Numeric        
Arguments:cSearchText, cCharactersToFind [, nOccurrence]        
Description:Searches cSearchText for any one of the characters in cCharactersToFind (case insensitive), returns the position of the first found (0 if not found), or the position of the nth occurrence if nOccurrence is specified        

 

 

Function:FormatDateTime        
Result-type:Text        
Arguments:cFormat, dValue        
Description:Formats a date/time value to text using the cFormat specification.  Details are in the FormatDateTime specifications topic.        

 

 

Function:FormatFloat        
Result-type:Text        
Arguments:cFormat, nValue        
Description:Formats a numeric value to text using the cFormat specification, assuming a floating-point number.  Details are in the FormatInt and FormatFloat specifications topic.        

 

 

Function:FormatInt        
Result-type:Text        
Arguments:cFormat, nValue        
Description:Formats a numeric value to text using the cFormat specification, assuming an integer number.  Details are in the FormatInt and FormatFloat specifications topic.        

 

 

Function:IsAlpha        
Result-type:Boolean        
Arguments:cCharacter        
Description:Returns TRUE if the character is an alphabetic character (a-z or A-Z)        

 

 

Function:IsDigit        
Result-type:Boolean        
Arguments:cCharacter        
Description:Returns TRUE if the character is a digit (0-9)        

 

 

Function:IsLower        
Result-type:Boolean        
Arguments:cCharacter        
Description:Returns TRUE if the character is a lower-case alphabetic character (a-z)        

 

 

Function:IsUpper        
Result-type:Boolean        
Arguments:cCharacter        
Description:Returns TRUE if the character is an upper-case alphabetic character (A-Z)        

 

 

Function:Left        
Result-type:Text        
Arguments:cText, nCharacters        
Description:Gets the specified number of left-most characters of the text        

 

 

Function:Len        
Result-type:Numeric        
Arguments:cText        
Description:Returns the length of the text (number of characters)        

 

 

Function:Like        
Result-type:Boolean        
Arguments:cTextWild, cText        
Description:Returns TRUE if cText matches cTextWild, with '?' and '*' wildcard character support in cTextWild. Case sensitive.        

 

 

Function:LoopConCat        
Result-type:Text        
Arguments:nStart, nEnd, cPlaceholder, cQuotedExpression [, cQuotedCondition]        
Description:For each number from nStart to nEnd, executes the quoted expression (with the number replacing the placeholder) and concatenates (appends) the text to the result. Optionally a condition can be specified so that the expression is only evaluated and concatenated if the condition is met for a given number.        

 

 

Function:Lower        
Result-type:Text        
Arguments:cText        
Description:Converts cText to all lower case        

 

 

Function:Max        
Result-type:Unknown        
Arguments:e1, e2 [,e3 ...]        
Description:Returns the maximum of any number of arguments. May be used for numbers, dates, boolean or text (case sensitive), as long as all arguments are the same type        

 

 

Function:Mid        
Result-type:Text        
Arguments:cText, nStartPosition [, nCharactersReturned]        
Description:Returns a sub-string from cText starting an the given position. A maximum number of characters to extract can optionally be specified        

 

 

Function:Min        
Result-type:Unknown        
Arguments:e1, e2 [,e3 ...]        
Description:Returns the minimum of any number of arguments. May be used for numbers, dates, boolean or text (case sensitive), as long as all arguments are the same type        

 

 

Function:Mixed        
Result-type:Text        
Arguments:cText        
Description:Converts cText to mixed-case, using the same algorithm as the automatic conversion option for customer fields

 

 

Function:Occurs        
Result-type:Numeric        
Arguments:cText, cTextToFind        
Description:Returns the number of times cTextToFind occurs in cText        

 

 

Function:OEMtoANSI        
Result-type:Text        
Arguments:cText        
Description:Convert OEM cText to ANSI characters        

 

 

Function:PadC        
Result-type:Text        
Arguments:eExpression, nResultSize [, cPadCharacter]        
Description:Pads the expression on both sides to center it in the given number of characters. Uses spaces for padding unless a padding character is specified. The expression can be text, date, boolean or a number (default formatting will be used if not text). If the resulting text is shorter than the nResultSize, it will be truncated        

 

 

Function:PadL        
Result-type:Text        
Arguments:eExpression, nResultSize [, cPadCharacter]        
Description:Pads the expression on the left (front) to result in the given number of characters. Uses spaces for padding unless a padding character is specified. The expression can be text, date, boolean or a number (default formatting will be used if not text). If the resulting text is shorter than the nResultSize, it will be truncated        

 

 

Function:PadR        
Result-type:Text        
Arguments:eExpression, nResultSize [, cPadCharacter]        
Description:Pads the expression on the right (end) to result in the given number of characters. Uses spaces for padding unless a padding character is specified. The expression can be text, date, boolean or a number (default formatting will be used if not text). If the resulting text is shorter than the nResultSize, it will be truncated        

 

 

Function:Percent        
Result-type:Text        
Arguments:nValue        
Description:Converts a numeric value into percentage text. Example: 3.5 -> '3.5%'        

 

 

Function:ReadFile        
Result-type:Text        
Arguments:cFile        
Description:Reads the entire contents of a file into a text string. The filename parameter can either have a complete path or just a filename -- if just a filename, it must be in the same folder as the current database. The maximum file size is 1,000,000 bytes.        

 

 

Function:Remove        
Result-type:Text        
Arguments:cSearched, cRemove        
Description:Removes any occurrences of cRemove from cSearched        

 

 

Function:RemoveAnyExcept        
Result-type:Text        
Arguments:cSearched, cRemoveExcept        
Description:Removes any characters that are not in cRemoveExcept from cSearched (e.g. if cRemoveExcept is '0123456789', will remove any non-digits.)        

 

 

Function:RemoveAnyOf        
Result-type:Text        
Arguments:cSearched, cRemove        
Description:Removes any occurrences of any character in cRemove from cSearched (e.g. if cRemove is '0123456789', will remove any digits.)        

 

 

Function:Replace        
Result-type:Text        
Arguments:cSearched, cSearchFor [, cReplacement] [, nStartPosition] [, nNumberOfOccurrences]        
Description:Replaces any occurrences (or the specified number of occurrences) of cSearchFor with cReplacement, optionally starting at the nth character if nStartPosition is specified. Example: Replace('ReplaceMyNameThere', 'MyName', 'Joe') -> 'ReplaceJoeThere'        

 

 

Function:ReplaceAnyOf        
Result-type:Text        
Arguments:cSearched, cSearchFor [, cReplacement] [, nStartPosition] [, nNumberOfOccurrences]        
Description:Replaces any occurrence (or the specified number of occurrences) of any single character in cSearchFor with cReplacement, optionally starting at the nth character if nStartPosition is specified.  Example: Replace('Replace~All-Dash_Chars', '~-_', ' ') -> 'Replace All Dash Chars'

 

 

Function:Replicate        
Result-type:Text        
Arguments:cText, nTimes [,cSeparator]        
Description:Creates a string of cText repeated nTimes, optionally with a given separator in between each replication        

 

 

Function:Right        
Result-type:Text        
Arguments:cText, nCharacters        
Description:Gets the specified number of right-most characters of the text        

 

 

Function:Spaces        
Result-type:Text        
Arguments:nSpaces        
Description:Returns a text string with the specified number of spaces in it        

 

 

Function:Str        
Result-type:Text        
Arguments:nValue [, nLength [, nDecimalPlaces]]        
Description:Converts a number to text, with an optional specific length and optional number of decimal places. If the length is > 0 it will be left-padded with spaces if possible, or truncated if necessary. If the whole number can't be shown, '###' will fill the length.        

 

 

Function:Stuff        
Result-type:Text        
Arguments:cText, nStartReplacement, nCharactersReplaced, cReplacement        
Description:Replace a given number of characters, starting with a given position, with the specified text. Example: Stuff('ReplaceMyNameThere',8, 6, 'Joe') -> 'ReplaceJoeThere'        

 

 

Function:TrimAll        
Result-type:Text        
Arguments:cText        
Description:Trim spaces from beginning and end of cText        

 

 

Function:        TrimAllNonDigits        

Result-type:        Text        

Arguments:        cText        

Description:        Extracts digits from text, returning only the digits as text. Example: 'cell (212) 555-1212' -> '2125551212'        

 

 

Function:TrimLeft        
Result-type:Text        
Arguments:cText        
Description:Removes all spaces from the left side of cText        

 

 

Function:TrimRight        
Result-type:Text        
Arguments:cText        
Description:Removes all spaces from the right side of cText        

 

 

Function:Upper        
Result-type:Text        
Arguments:cText        
Description:Converts cText to all upper case        

 

 

Function:Val        
Result-type:Numeric        
Arguments:cText        
Description:Converts text to a numeric value, if possible (up to the first non-numeric character encountered)        

 

 

Function:WriteFile        
Result-type:Boolean        
Arguments:cFile, cText        
Description:Writes the contents of a text string to a file. Creates the file if necessary, and overwrites it if it already exists. Note that newline characters in the text are written as carriage return-linefeed pairs. The filename parameter can either have a complete path or just a filename -- if just a filename, it must be in the same folder as the current database.        

 

 

 

 


Page URL http://CampgroundMaster.com/help/text.html

Campground Master Home