Namespace: Consultingwerk.Util
Class 
StringHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:StringHelper
Purpose:Routines to support string (CHARACTER) operations
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Wed Oct 24 12:34:34 CEST 2012
Purpose: Disallow instance creation
Notes:



Top Method Summary
Options Name Purpose
+ CHARACTER Backwards (character) Returns the input string in backwards
+ CHARACTER Base64UrlEncodedToBase64Encoded (character) Converts a BASE64 URL Encoded String to BASE64 Encoded
+ LONGCHAR Base64UrlEncodedToBase64Encoded (longchar) Converts a BASE64 URL Encoded String to BASE64 Encoded
+ CHARACTER CamelCaseWord (character) CamelCases a single word
+ CHARACTER CamelCaseWords (character) CamelCases a string from "Camel case" to "CamelCase"
+ CHARACTER CamelCaseWords2 (character) CamelCases a string from "Camel case" to "CamelCase"
+ CHARACTER CapitalizeFirstLetter (character) Capitalizes the first letter of a given string
+ CHARACTER CapitalLetters (character) Returns the capital letters and numbers of the given string
+ CHARACTER CleanupWhitespace (character) Cleans whitespace characters in a string
+ LOGICAL ContainsAnyStringOf (character, character[]) Returns true when the source string contains at least one of the target strings
+ LOGICAL ContainsAnyStringOf (longchar, character[]) Returns true when the source string contains at least one of the target strings
+ INTEGER CountOccurencesOf (character, character) Counts the occurrences of the given target string in the source string
+ CHARACTER EncodeString (character) Encodes an (user) input string for processing, e.g. in a dynamic query string
+ LOGICAL Ends (character, character) Returns TRUE when the given source string ends in the ending string
+ LONGCHAR EnsureCrLf (longchar) Ensures the usage of CR/LF as line ending
+ CHARACTER EscapeBackslash (character) Ensures that any backslash in the input character value is escaped When the backslash is prefixed by the tilde ~ , no further action is taken. Otherwise a ~ is inserted
+ CHARACTER EscapeCurlyBraces (character) Escapes unescaped Curly Braces in the given string with a tilde. This may be required for dynamic query strings
+ CHARACTER FillString (character, integer) Fills (or truncates) the source string to the given number of characters
+ INTEGER FindClosingBracket (character, integer) Returns the position of the closing bracket for the bracket opened at the given position in the String
+ INTEGER FindClosingBracket (longchar, integer) Returns the position of the closing bracket for the bracket opened at the given position in the String
+ INTEGER FindClosingComment (longchar, integer) Returns the position of the closing comment for the comment opened at the given position in the String
+ INTEGER FindClosingQuote (character, integer) Returns the position of the closing quote sign (either " or ') in a String
+ INTEGER FindClosingQuote (character, integer, logical) Returns the position of the closing quote sign (either " or ') in a String
+ INTEGER FindClosingQuote (longchar, integer) Returns the position of the closing quote sign (either " or ') in a String
+ INTEGER FindClosingQuote (longchar, integer, logical) Returns the position of the closing quote sign (either " or ') in a String
+ INTEGER FirstCapitalLetter (character) Returns the position of the first capital letter in the given string
+ CHARACTER FirstCharactersOf (longchar, integer) Returns the first n characters of a LONGCHAR as a CHARACTER value
+ CHARACTER FirstNonEmptyString (character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character, character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character, character, character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character, character, character, character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character, character, character, character, character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character, character, character, character, character, character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character, character, character, character, character, character, character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character, character, character, character, character, character, character, character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character, character, character, character, character, character, character, character, character, character) Returns the first non empty string of the parameter list
+ CHARACTER FirstNonEmptyString (character[]) Returns the first non empty string of the provided array
+ INTEGER FirstOccurenceOf (character, character) Returns the first position of any of the given characters in the source string
+ INTEGER FirstOccurenceOf (character, character, integer) Returns the first position of any of the given characters in the source string
+ INTEGER FirstOccurenceOf (longchar, character) Returns the first position of any of the given characters in the source string
+ INTEGER FirstOccurenceOf (longchar, character, integer) Returns the first position of any of the given characters in the source string
+ CHARACTER FixBase64String (character) Appends missing = characters to a BASE64 encoded string
+ LONGCHAR FixBase64String (longchar) Appends missing = characters to a BASE64 encoded string
+ LONGCHAR FixLineEnding (longchar) Fixes the line ending characters of the given longchar
+ CHARACTER GenerateUuid () Returns the CHARACTER representation of a new UUID
+ CHARACTER Indent (character, integer) Indents a string by inserting a SPACE character at the beginning of every line
+ CHARACTER Indent (longchar, integer) Indents a string by inserting a SPACE character at the beginning of every line
+ INTEGER IndexUnquoted (character, character) Returns an INTEGER value that indicates the position of the target string within the source string
+ INTEGER IndexUnquoted (character, character, integer) Returns an INTEGER value that indicates the position of the target string within the source string
+ CHARACTER Insert (character, integer, character) Inserts a string into another string at a given position
+ LONGCHAR Insert (longchar, integer, character) Inserts a string into another string at a given position
+ LOGICAL IsLowercaseCharacter (character) Returns true when the given character is UPPERCASE
+ LOGICAL IsQuoted (character) Returns if the string is quoted
+ LOGICAL IsUppercaseCharacter (character) Returns true when the given character is UPPERCASE
+ INTEGER LineNumber (longchar, integer) Returns the line number of a given position in a longchar
+ CHARACTER LowercaseFirstLetter (character) Ensures the first character is lower case
+ CHARACTER MappedEntry (character, character, logical, character) Return the 'other' entry in a separated list of paired entries. This is required to ensure that the lookup does not find a matching entry in the wrong part of the pair.
+ INTEGER NextNonWhiteSpaceCharacter (character) Returns position of the next non whitespace character
+ INTEGER NextNonWhiteSpaceCharacter (character, integer) Returns position of the next non whitespace character
+ INTEGER NextNonWhiteSpaceCharacter (longchar) Returns position of the next non whitespace character
+ INTEGER NextNonWhiteSpaceCharacter (longchar, integer) Returns position of the next non whitespace character
+ CHARACTER ParseVariableName (character, integer) Returns the name of a variable masked in the form of xyz@{abc}def (so abc in this sample)
+ LONGCHAR PrefixLines (longchar, character) Prefixes every line in the given LONGCHAR with a given CHARACTER
+ Consultingwerk.Framework.Collections.CharacterList QuoteAndBracketSafeEntriesToList (character) Returns an CharacterList of the Entries in a delimited String
+ Consultingwerk.Framework.Collections.CharacterList QuoteAndBracketSafeEntriesToList (character, character) Returns an CharacterList of the Entries in a delimited String
+ Consultingwerk.Framework.Collections.CharacterList QuoteSafeEntriesToList (character) Returns an CharacterList of the Entries in a delimited String
+ Consultingwerk.Framework.Collections.CharacterList QuoteSafeEntriesToList (character, character) Returns an CharacterList of the Entries in a delimited String
+ CHARACTER RemoveCharacters (character, character) Removes the given characters from the string
+ CHARACTER RemovePrefix (character, character) Removes the given prefix at the beginning of the passed in String
+ CHARACTER RemoveSuffix (character, character) Removes the given suffix at the beginning of the passed in String
+ CHARACTER RemoveWhiteSpace (character) Removes all SPACE, TAB, CR, NL from the input string
+ CHARACTER ResolveDoubleQuotes (character) Replaces "" or '' within a string with only a single " or '
+ INTEGER RightMostIndex (character, character) Returns an INTEGER value that indicates the position of the right-most target string within the source string. In contrast to the R-INDEX function, this method treats the pcTarget argument as individual characters and returns the rightmost position of any of those characters
+ INTEGER RightMostIndex (character, character, integer) Returns an INTEGER value that indicates the position of the right-most target string within the source string. In contrast to the R-INDEX function, this method treats the pcTarget argument as individual characters and returns the rightmost position of any of those characters
+ INTEGER RightMostIndex (longchar, character) Returns an INTEGER value that indicates the position of the right-most target string within the source longchar. In contrast to the R-INDEX function, this method treats the pcTarget argument as individual characters and returns the rightmost position of any of those characters
+ INTEGER RightMostIndex (longchar, character, integer) Returns an INTEGER value that indicates the position of the right-most target string within the source longchar. In contrast to the R-INDEX function, this method treats the pcTarget argument as individual characters and returns the rightmost position of any of those characters
+ CHARACTER SafeCharacterAppend (character, character) Provides a safe method to append into a CHARACTER value
+ CHARACTER SplitText (character, character, integer, integer) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText (character, character, integer, integer, logical) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText (character, integer, integer) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText (character, integer, integer, logical) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText (longchar, character, integer, integer) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText (longchar, character, integer, integer, logical) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText (longchar, integer, integer) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText (longchar, integer, integer, logical) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText2 (character, character, integer, integer) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText2 (character, character, integer, integer, logical) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText2 (character, integer, integer) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText2 (character, integer, integer, logical) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText2 (longchar, character, integer, integer) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText2 (longchar, character, integer, integer, logical) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText2 (longchar, integer, integer) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER SplitText2 (longchar, integer, integer, logical) Splits the input text into individual lines into a CHARACTER EXTENT
+ CHARACTER StringValue (Object) Returns the ToString() value of an object reference
+ CHARACTER StringValues (Object[]) Returns list of the ToString() values of an array of object reference
+ CHARACTER SubstituteVariable (character, integer, IVariableValueProvider) Substitutes the variable at the given location in the source string
+ CHARACTER Unbracket (character) Removes brackets from a Character String
+ LONGCHAR Uncomment (longchar) Removes the outer-most commend of the provided string
+ CHARACTER Unquote (character) Removes quotes from a Character String
+ LONGCHAR Unquote (longchar) Removes quotes from a Longchar String
+ CHARACTER UppercaseFirstLetter (character) Ensures the first character is UPPER case
+ CHARACTER UrlEncode (character, character) Encodes unsafe characters in a URL as per RFC 1738 section 2.2. http://ds.internic.net/rfc/rfc1738.txt
+ CHARACTER WellFormFromCamelCase (character) Turns a CamelCased string into a well formed sentence (Camel Cased)

Top Constructor Summary
Options Name Purpose
# StringHelper () Disallow instance creation


Method Detail
Top

PUBLIC CHARACTER Backwards (character)

Purpose: Returns the input string in backwards
Notes:

Parameters:
pcString CHARACTER
The string to be returned backwards
Returns CHARACTER
The backwards variant
Top

PUBLIC CHARACTER Base64UrlEncodedToBase64Encoded (character)

Purpose: Converts a BASE64 URL Encoded String to BASE64 Encoded
Notes:

Parameters:
pcBase64UrlEncoded CHARACTER
The BASE64 URL Encoded representation
Returns CHARACTER
The BASE64 Encoded representation
Top

PUBLIC LONGCHAR Base64UrlEncodedToBase64Encoded (longchar)

Purpose: Converts a BASE64 URL Encoded String to BASE64 Encoded
Notes:

Parameters:
plcBase64UrlEncoded LONGCHAR
The BASE64 URL Encoded representation
Returns LONGCHAR
The BASE64 Encoded representation
Top

PUBLIC CHARACTER CamelCaseWord (character)

Purpose: CamelCases a single word
Notes: Does support standard letters (ASCII only), no Umlaute

Parameters:
pcWord CHARACTER
The string containing a single word to camelcase
Returns CHARACTER
The CamelCased version of the word
Top

PUBLIC CHARACTER CamelCaseWords (character)

Purpose: CamelCases a string from "Camel case" to "CamelCase"
Notes: Does support standard letters (ASCII only), no Umlaute

Parameters:
pcString CHARACTER
The string containing a single word to camelcase
Returns CHARACTER
The CamelCased version of the string
Top

PUBLIC CHARACTER CamelCaseWords2 (character)

Purpose: CamelCases a string from "Camel case" to "CamelCase"
Notes: Does support standard letters (ASCII only), no Umlaute
This version of CamelCaseWords does only enforce uppercase on the
first letter of each word and does not change the case of any other
character - so existing upper case chars stay upper case (which is
different from the method CamelCaseWords)

Parameters:
pcString CHARACTER
The string containing a single word to camelcase
Returns CHARACTER
The CamelCased version of the string
Top

PUBLIC CHARACTER CapitalizeFirstLetter (character)

Purpose: Capitalizes the first letter of a given string
Notes:

Parameters:
pcString CHARACTER
The string in which to capitalize the first letter
Returns CHARACTER
The string with the first letter capitalized
Top

PUBLIC CHARACTER CapitalLetters (character)

Purpose: Returns the capital letters and numbers of the given string
Notes: When the first letter is lower case, this is returned as well
only when there are other capital letters
Considers ASC codes from 65 - 90 upper case

Parameters:
pcString CHARACTER
The input string
Returns CHARACTER
The string with the capital letters
Top

PUBLIC CHARACTER CleanupWhitespace (character)

Purpose: Cleans whitespace characters in a string
Notes: Replaced TAB, CR, NL with Space, removes duplicate spaces

Parameters:
pcString CHARACTER
The input string
Returns CHARACTER
The cleaned up string
Top

PUBLIC LOGICAL ContainsAnyStringOf (character, character[])

Purpose: Returns true when the source string contains at least one of the target strings
Notes:

Parameters:
pcSourceString CHARACTER
The string to locate the target strings in
pcTargetStrings CHARACTER
The array of strings to locate in the target string
Returns LOGICAL
Logical value indicating if the source string contains at least on of the target strings
Top

PUBLIC LOGICAL ContainsAnyStringOf (longchar, character[])

Purpose: Returns true when the source string contains at least one of the target strings
Notes:

Parameters:
pcSourceString LONGCHAR
The string to locate the target strings in
pcTargetStrings CHARACTER
The array of strings to locate in the target string
Returns LOGICAL
Logical value indicating if the source string contains at least on of the target strings
Top

PUBLIC INTEGER CountOccurencesOf (character, character)

Purpose: Counts the occurrences of the given target string in the source string
Notes: Does ignore occurrences within quotes

Parameters:
pcTargetString CHARACTER
The string to count in the pcSourceString
pcSourceString CHARACTER
The string to count in
Returns INTEGER
The number of occurrences of the target string within the source string excluding occurrences in quotes
Top

PUBLIC CHARACTER EncodeString (character)

Purpose: Encodes an (user) input string for processing, e.g. in a dynamic
query string
Notes: Replaces ~ -> ~~, { -> ~{, \ -> ~\ and } -> ~}

Parameters:
pcString CHARACTER
The input string
Returns CHARACTER
The encoded string
Top

PUBLIC LOGICAL Ends (character, character)

Purpose: Returns TRUE when the given source string ends in the ending string
Notes: Equivalent to the ABL BEGINS operator / function

Parameters:
pcSourceString CHARACTER
The source string to check if it ends with the ending string
pcEndingString CHARACTER
The string to check if the source string ends with
Returns LOGICAL
Logical value indicating if the given source string ends in the ending string
Top

PUBLIC LONGCHAR EnsureCrLf (longchar)

Purpose: Ensures the usage of CR/LF as line ending
Notes:

Parameters:
plcString LONGCHAR
The input LONGCHAR
Returns LONGCHAR
The string with CR/LF as the line ending
Top

PUBLIC CHARACTER EscapeBackslash (character)

Purpose: Ensures that any backslash in the input character value is escaped
When the backslash is prefixed by the tilde ~ , no further action is
taken. Otherwise a ~ is inserted
Notes: This method is required for dynamic Query Strings processed on UNIX
See SCL-1809

Parameters:
pcInputString CHARACTER
The string in which to ensure that all backslash characters are escaped with a tilde
Returns CHARACTER
The escaped string
Top

PUBLIC CHARACTER EscapeCurlyBraces (character)

Purpose: Escapes unescaped Curly Braces in the given string with a
tilde. This may be required for dynamic query strings
Notes:

Parameters:
pcString CHARACTER
The string in which to escape tildes
Returns CHARACTER
The resulting string
Top

PUBLIC CHARACTER FillString (character, integer)

Purpose: Fills (or truncates) the source string to the given number of characters
Notes:

Parameters:
pcString CHARACTER
The source string
piLength INTEGER
The desired length for the string
Returns CHARACTER
The string matching the desired length
Top

PUBLIC INTEGER FindClosingBracket (character, integer)

Purpose: Returns the position of the closing bracket for the bracket opened
at the given position in the String
Notes: Ignores brackets that are within a quote
Throws: Consultingwerk.Exceptions.UnmatchedBracketException, Consultingwerk.Exceptions.InvalidParameterValueException

Parameters:
pcString CHARACTER
The LONGCHAR string to locate the closing bracket in
piPosition INTEGER
The position of the opening bracket in the string
Returns INTEGER
The position of the closing quote
Top

PUBLIC INTEGER FindClosingBracket (longchar, integer)

Purpose: Returns the position of the closing bracket for the bracket opened
at the given position in the String
Notes: Ignores brackets that are within a quote
Throws: Consultingwerk.Exceptions.UnmatchedBracketException, Consultingwerk.Exceptions.InvalidParameterValueException

Parameters:
pcString LONGCHAR
The LONGCHAR string to locate the closing bracket in
piPosition INTEGER
The position of the opening bracket in the string
Returns INTEGER
The position of the closing quote
Top

PUBLIC INTEGER FindClosingComment (longchar, integer)

Purpose: Returns the position of the closing comment for the comment opened
at the given position in the String
Notes: Returns the position of a / of the comment terminator star slash,
Comments in quotes are ignored, it is however expected that the
opening comment is not inside a quote
Throws: Consultingwerk.Exceptions.UnmatchedCommentException, Consultingwerk.Exceptions.InvalidParameterValueException

Parameters:
pcString LONGCHAR
The LONGCHAR string to locate the closing bracket in
piPosition INTEGER
The position of the opening bracket in the string
Returns INTEGER
The position of the closing quote
Top

PUBLIC INTEGER FindClosingQuote (character, integer)

Purpose: Returns the position of the closing quote sign (either " or ') in a String
Notes:
Throws: Consultingwerk.Exceptions.UnmatchedQuoteException, Consultingwerk.Exceptions.InvalidParameterValueException

Parameters:
pcString CHARACTER
The LONGCHAR string to locate the closing quote in
piPosition INTEGER
The position of the opening quote in the string
Returns INTEGER
The position of the closing quote
Top

PUBLIC INTEGER FindClosingQuote (character, integer, logical)

Purpose: Returns the position of the closing quote sign (either " or ') in a String
Notes:
Throws: Consultingwerk.Exceptions.UnmatchedQuoteException, Consultingwerk.Exceptions.InvalidParameterValueException

Parameters:
pcString CHARACTER
The LONGCHAR string to locate the closing quote in
piPosition INTEGER
The position of the opening quote in the string
plParseQueryString LOGICAL
Special handling for "" within query strings
Returns INTEGER
The position of the closing quote
Top

PUBLIC INTEGER FindClosingQuote (longchar, integer)

Purpose: Returns the position of the closing quote sign (either " or ') in a String
Notes:
Throws: Consultingwerk.Exceptions.UnmatchedQuoteException, Consultingwerk.Exceptions.InvalidParameterValueException

Parameters:
pcString LONGCHAR
The LONGCHAR string to locate the closing quote in
piPosition INTEGER
The position of the opening quote in the string
Returns INTEGER
The position of the closing quote
Top

PUBLIC INTEGER FindClosingQuote (longchar, integer, logical)

Purpose: Returns the position of the closing quote sign (either " or ') in a String
Notes:
Throws: Consultingwerk.Exceptions.UnmatchedQuoteException, Consultingwerk.Exceptions.InvalidParameterValueException

Parameters:
pcString LONGCHAR
The LONGCHAR string to locate the closing quote in
piPosition INTEGER
The position of the opening quote in the string
plParseQueryString LOGICAL
Special handling for "" within query strings
Returns INTEGER
The position of the closing quote
Top

PUBLIC INTEGER FirstCapitalLetter (character)

Purpose: Returns the position of the first capital letter in the given string
Notes:

Parameters:
pcString CHARACTER
The string to parse
Returns INTEGER
The position of the first capital letter or 0 when there is no capital letter
Top

PUBLIC CHARACTER FirstCharactersOf (longchar, integer)

Purpose: Returns the first n characters of a LONGCHAR as a CHARACTER value
Notes: Appends "..." to the string, when the value had to be truncated

Parameters:
plcLongstring LONGCHAR
The long string
piNumCharacters INTEGER
The number of characters to return
Returns CHARACTER
The character value with the first n characters
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
pcString3 CHARACTER
The third string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character, character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
pcString3 CHARACTER
The third string
pcString4 CHARACTER
The fourth string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character, character, character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
pcString3 CHARACTER
The third string
pcString4 CHARACTER
The fourth string
pcString5 CHARACTER
The fifth string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character, character, character, character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
pcString3 CHARACTER
The third string
pcString4 CHARACTER
The fourth string
pcString5 CHARACTER
The fifth string
pcString6 CHARACTER
The sixth string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character, character, character, character, character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
pcString3 CHARACTER
The third string
pcString4 CHARACTER
The fourth string
pcString5 CHARACTER
The fifth string
pcString6 CHARACTER
The sixth string
pcString7 CHARACTER
The seventh string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character, character, character, character, character, character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
pcString3 CHARACTER
The third string
pcString4 CHARACTER
The fourth string
pcString5 CHARACTER
The fifth string
pcString6 CHARACTER
The sixth string
pcString7 CHARACTER
The seventh string
pcString8 CHARACTER
The eighth string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character, character, character, character, character, character, character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
pcString3 CHARACTER
The third string
pcString4 CHARACTER
The fourth string
pcString5 CHARACTER
The fifth string
pcString6 CHARACTER
The sixth string
pcString7 CHARACTER
The seventh string
pcString8 CHARACTER
The eighth string
pcString9 CHARACTER
The ninth string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character, character, character, character, character, character, character, character, character, character)

Purpose: Returns the first non empty string of the parameter list
Notes:

Parameters:
pcString1 CHARACTER
The first string
pcString2 CHARACTER
The second string
pcString3 CHARACTER
The third string
pcString4 CHARACTER
The fourth string
pcString5 CHARACTER
The fifth string
pcString6 CHARACTER
The sixth string
pcString7 CHARACTER
The seventh string
pcString8 CHARACTER
The eighth string
pcString9 CHARACTER
The ninth string
pcString10 CHARACTER
The tenth string
Returns CHARACTER
The first non empty string of the parameter list
Top

PUBLIC CHARACTER FirstNonEmptyString (character[])

Purpose: Returns the first non empty string of the provided array
Notes:

Parameters:
pcStrings CHARACTER
The first string
Returns CHARACTER
The first non empty string of the array
Top

PUBLIC INTEGER FirstOccurenceOf (character, character)

Purpose: Returns the first position of any of the given characters in the
source string
Notes: Returns 0 when none of the characters can be found

Parameters:
pcSourceString CHARACTER
The source string
pcCharacters CHARACTER
The comma-delimited list of characters
Returns INTEGER
The first position of any of the given characters
Top

PUBLIC INTEGER FirstOccurenceOf (character, character, integer)

Purpose: Returns the first position of any of the given characters in the
source string
Notes: Returns 0 when none of the characters can be found

Parameters:
pcSourceString CHARACTER
The source string
pcCharacters CHARACTER
The comma-delimited list of characters
piStarting INTEGER
An integer that specifies at which left-most position in the string to start the search
Returns INTEGER
The first position of any of the given characters
Top

PUBLIC INTEGER FirstOccurenceOf (longchar, character)

Purpose: Returns the first position of any of the given characters in the
source string
Notes: Returns 0 when none of the characters can be found

Parameters:
pcSourceString LONGCHAR
The source string
pcCharacters CHARACTER
The comma-delimited list of characters
Returns INTEGER
The first position of any of the given characters
Top

PUBLIC INTEGER FirstOccurenceOf (longchar, character, integer)

Purpose: Returns the first position of any of the given characters in the
source string
Notes: Returns 0 when none of the characters can be found

Parameters:
pcSourceString LONGCHAR
The source string
pcCharacters CHARACTER
The comma-delimited list of characters
piStarting INTEGER
An integer that specifies at which left-most position in the string to start the search
Returns INTEGER
The first position of any of the given characters
Top

PUBLIC CHARACTER FixBase64String (character)

Purpose: Appends missing = characters to a BASE64 encoded string
Notes:

Parameters:
pcBase64String CHARACTER
The BASE64 representation to fix
Returns CHARACTER
The Base64 String appended with the missing = characters
Top

PUBLIC LONGCHAR FixBase64String (longchar)

Purpose: Appends missing = characters to a BASE64 encoded string
Notes:

Parameters:
pcBase64String LONGCHAR
The BASE64 representation to fix
Returns LONGCHAR
The Base64 String appended with the missing = characters
Top

PUBLIC LONGCHAR FixLineEnding (longchar)

Purpose: Fixes the line ending characters of the given longchar
Notes: Line Ending will be set to Consultingwerk.Environment:NewLine

Parameters:
plcString LONGCHAR
The Longchar to fix the line ending at
Returns LONGCHAR
The Longchar value with the fixed line ending characters
Top

PUBLIC CHARACTER GenerateUuid ()

Purpose: Returns the CHARACTER representation of a new UUID
Notes:

Returns CHARACTER
The CHARACTER representation of the new UUID
Top

PUBLIC CHARACTER Indent (character, integer)

Purpose: Indents a string by inserting a SPACE character at the beginning
of every line
Notes:

Parameters:
pcString CHARACTER
The string to indent
piIndent INTEGER
The number of characters to indent the string
Returns CHARACTER
The indented string
Top

PUBLIC CHARACTER Indent (longchar, integer)

Purpose: Indents a string by inserting a SPACE character at the beginning
of every line
Notes:

Parameters:
plcString LONGCHAR
The string to indent
piIndent INTEGER
The number of characters to indent the string
Returns CHARACTER
The indented string
Top

PUBLIC INTEGER IndexUnquoted (character, character)

Purpose: Returns an INTEGER value that indicates the position of the
target string within the source string
Notes: Implements the ABL LOOKUP function, but does not does not
return matches inside quotes

Parameters:
pcSource CHARACTER
The source string
pcTarget CHARACTER
The target string
Returns INTEGER
The position of the target string or zero
Top

PUBLIC INTEGER IndexUnquoted (character, character, integer)

Purpose: Returns an INTEGER value that indicates the position of the
target string within the source string
Notes: Implements the ABL LOOKUP function, but does not does not
return matches inside quotes

Parameters:
pcSource CHARACTER
The source string
pcTarget CHARACTER
The target string
piStarting INTEGER
An integer that specifies at which left-most position in the string to start the search.
Returns INTEGER
The position of the target string or zero
Top

PUBLIC CHARACTER Insert (character, integer, character)

Purpose: Inserts a string into another string at a given position
Notes:

Parameters:
pcSourceString CHARACTER
The source string, into which you want to insert another string
piPosition INTEGER
The position at which you want to insert the target string
pcTargetString CHARACTER
The target string, which will be inserted into the source string
Returns CHARACTER
The Source String with the Target string inserted
Top

PUBLIC LONGCHAR Insert (longchar, integer, character)

Purpose: Inserts a string into another string at a given position
Notes:

Parameters:
pcSourceString LONGCHAR
The source string, into which you want to insert another string
piPosition INTEGER
The position at which you want to insert the target string
pcTargetString CHARACTER
The target string, which will be inserted into the source string
Returns LONGCHAR
The Source String with the Target string inserted
Top

PUBLIC LOGICAL IsLowercaseCharacter (character)

Purpose: Returns true when the given character is UPPERCASE
Notes:

Parameters:
pcCharacter CHARACTER
The character to test
Returns LOGICAL
True when the given character is UPPERCASE
Top

PUBLIC LOGICAL IsQuoted (character)

Purpose: Returns if the string is quoted
Notes:

Parameters:
pcString CHARACTER
The string to verify
Returns LOGICAL
Logical value indicating if the string is quoted
Top

PUBLIC LOGICAL IsUppercaseCharacter (character)

Purpose: Returns true when the given character is UPPERCASE
Notes:

Parameters:
pcCharacter CHARACTER
The character to test
Returns LOGICAL
True when the given character is UPPERCASE
Top

PUBLIC INTEGER LineNumber (longchar, integer)

Purpose: Returns the line number of a given position in a longchar
Notes: Based on locating CHR(10)

Parameters:
pcLongchar LONGCHAR
The string in which to look for the position
piPosition INTEGER
The position of a character to look for
Returns INTEGER
The line number
Top

PUBLIC CHARACTER LowercaseFirstLetter (character)

Purpose: Ensures the first character is lower case
Notes:

Parameters:
pcString CHARACTER
The input string
Returns CHARACTER
The string with the first letter lowercased
Top

PUBLIC CHARACTER MappedEntry (character, character, logical, character)

Purpose: Return the 'other' entry in a separated list of paired entries.
This is required to ensure that the lookup does not find a matching
entry in the wrong part of the pair.
Notes: Used to find mapped RowObject or database column in assignList.
In other cases, such as the ObjectMapping property of SBOs, an
entry may occur more than once in the list, in which case a list
of matching values is returned, using the same delimiter as the list.
Returns ? if no entry is found
From src/adm2/smart.i

Parameters:
pcEntry CHARACTER
Entry to lookup.
pcList CHARACTER
Comma separated list with paired entries.
plFirst LOGICAL
TRUE - lookup first and RETURN second, FALSE - lookup second and RETURN first
pcDelimiter CHARACTER
Delimiter of pcList
Returns CHARACTER
The entry of ? when the entry is not found
Top

PUBLIC INTEGER NextNonWhiteSpaceCharacter (character)

Purpose: Returns position of the next non whitespace character
Notes: Returns the starting position, when that's not a white space

Parameters:
pcSourceString CHARACTER
The string to search in
Returns INTEGER
The position of the next non white space character
Top

PUBLIC INTEGER NextNonWhiteSpaceCharacter (character, integer)

Purpose: Returns position of the next non whitespace character
Notes: Returns the starting position, when that's not a white space, returns ?
when no non whitespace character was found

Parameters:
pcSourceString CHARACTER
The string to search in
piStartingPosition INTEGER
The position to start searching at
Returns INTEGER
The position of the next non white space character
Top

PUBLIC INTEGER NextNonWhiteSpaceCharacter (longchar)

Purpose: Returns position of the next non whitespace character
Notes: Returns the starting position, when that's not a white space

Parameters:
pcSourceString LONGCHAR
The string to search in
Returns INTEGER
The position of the next non white space character
Top

PUBLIC INTEGER NextNonWhiteSpaceCharacter (longchar, integer)

Purpose: Returns position of the next non whitespace character
Notes: Returns the starting position, when that's not a white space, returns ?
when no non whitespace character was found

Parameters:
pcSourceString LONGCHAR
The string to search in
piStartingPosition INTEGER
The position to start searching at
Returns INTEGER
The position of the next non white space character
Top

PUBLIC CHARACTER ParseVariableName (character, integer)

Purpose: Returns the name of a variable masked in the form of xyz@{abc}def
(so abc in this sample)
Notes:

Parameters:
pcString CHARACTER
The string containing the variable name
piPosition INTEGER
The position of the @
Returns CHARACTER
The name of the variable
Top

PUBLIC LONGCHAR PrefixLines (longchar, character)

Purpose: Prefixes every line in the given LONGCHAR with a given CHARACTER
Notes: Useful for formatted log-file output

Parameters:
plcLongchar LONGCHAR
The source LONGCHAR value
pcPrefix CHARACTER
The prefix to add to each line from the source LONGCHAR
Returns LONGCHAR
The new LONGCHAR value
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList QuoteAndBracketSafeEntriesToList (character)

Purpose: Returns an CharacterList of the Entries in a delimited String
Notes: This method is similar to the ABL ENTRY/NUM-ENTRIES functions, but
does consider " or ' and ( ) when parsing the string

Parameters:
pcString CHARACTER
The delimited string
Returns Consultingwerk.Framework.Collections.CharacterList
The CharacterList with the entries from the source delimited string
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList QuoteAndBracketSafeEntriesToList (character, character)

Purpose: Returns an CharacterList of the Entries in a delimited String
Notes: This method is similar to the ABL ENTRY/NUM-ENTRIES functions, but
does consider " or ' and ( ) when parsing the string

Parameters:
pcString CHARACTER
The delimited string
pcDelimiter CHARACTER
The string delimiter (single char)
Returns Consultingwerk.Framework.Collections.CharacterList
The CharacterList with the entries from the source delimited string
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList QuoteSafeEntriesToList (character)

Purpose: Returns an CharacterList of the Entries in a delimited String
Notes: This method is similar to the ABL ENTRY/NUM-ENTRIES functions, but
does consider " or ' when parsing the string

Parameters:
pcString CHARACTER
The delimited string
Returns Consultingwerk.Framework.Collections.CharacterList
The CharacterList with the entries from the source delimited string
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList QuoteSafeEntriesToList (character, character)

Purpose: Returns an CharacterList of the Entries in a delimited String
Notes: This method is similar to the ABL ENTRY/NUM-ENTRIES functions, but
does consider " or ' when parsing the string

Parameters:
pcString CHARACTER
The delimited string
pcDelimiter CHARACTER
The string delimiter (single char)
Returns Consultingwerk.Framework.Collections.CharacterList
The CharacterList with the entries from the source delimited string
Top

PUBLIC CHARACTER RemoveCharacters (character, character)

Purpose: Removes the given characters from the string
Notes: Characters are passed without any delimiters

Parameters:
pcString CHARACTER
The string to remove characters from
pcCharacters CHARACTER
The undelimited list of characters to remove
Returns CHARACTER
The new string
Top

PUBLIC CHARACTER RemovePrefix (character, character)

Purpose: Removes the given prefix at the beginning of the passed in String
Notes: When the String does not begin with the prefix, the original string
is returned

Parameters:
pcSourceString CHARACTER
The source string to remove the prefix from
pcPrefixString CHARACTER
The prefix to remove from the source string
Returns CHARACTER
The resulting string without the prefix
Top

PUBLIC CHARACTER RemoveSuffix (character, character)

Purpose: Removes the given suffix at the beginning of the passed in String
Notes: When the String does not begin with the suffix, the original string
is returned

Parameters:
pcSourceString CHARACTER
The source string to remove the suffix from
pcSuffixString CHARACTER
The suffix to remove from the source string
Returns CHARACTER
The resulting string without the suffix
Top

PUBLIC CHARACTER RemoveWhiteSpace (character)

Purpose: Removes all SPACE, TAB, CR, NL from the input string
Notes:

Parameters:
pcString CHARACTER
The input string
Returns CHARACTER
The string with the white space chars removed
Top

PUBLIC CHARACTER ResolveDoubleQuotes (character)

Purpose: Replaces "" or '' within a string with only a single " or '
Notes: Reverses the QUOTER() functions handling of " and ' in a string
See SCL-1639 for details

Parameters:
pcString CHARACTER
The source string
Returns CHARACTER
The resulting string
Top

PUBLIC INTEGER RightMostIndex (character, character)

Purpose: Returns an INTEGER value that indicates the position of the right-most target
string within the source string. In contrast to the R-INDEX function, this method
treats the pcTarget argument as individual characters and returns the rightmost
position of any of those characters
Notes:

Parameters:
pcSource CHARACTER
The source string in which to locate the target characters
pcTarget CHARACTER
The characters to search for, without any delimiter, e.g. " ,.-;:~r~n"
Returns INTEGER
The index of the target characters or 0 when no character can be found
Top

PUBLIC INTEGER RightMostIndex (character, character, integer)

Purpose: Returns an INTEGER value that indicates the position of the right-most target
string within the source string. In contrast to the R-INDEX function, this method
treats the pcTarget argument as individual characters and returns the rightmost
position of any of those characters
Notes:

Parameters:
pcSource CHARACTER
The source string in which to locate the target characters
pcTarget CHARACTER
The characters to search for, without any delimiter, e.g. " ,.-;:~r~n"
piStarting INTEGER
An integer that specifies the begin point for the search. The search is right-to-left and starts from the starting point.
Returns INTEGER
The index of the target characters or 0 when no character can be found
Top

PUBLIC INTEGER RightMostIndex (longchar, character)

Purpose: Returns an INTEGER value that indicates the position of the right-most target
string within the source longchar. In contrast to the R-INDEX function, this method
treats the pcTarget argument as individual characters and returns the rightmost
position of any of those characters
Notes:

Parameters:
plcSource LONGCHAR
The source longchar in which to locate the target characters
pcTarget CHARACTER
The characters to search for, without any delimiter, e.g. " ,.-;:~r~n"
Returns INTEGER
The index of the target characters or 0 when no character can be found
Top

PUBLIC INTEGER RightMostIndex (longchar, character, integer)

Purpose: Returns an INTEGER value that indicates the position of the right-most target
string within the source longchar. In contrast to the R-INDEX function, this method
treats the pcTarget argument as individual characters and returns the rightmost
position of any of those characters
Notes:

Parameters:
plcSource LONGCHAR
The source longchar in which to locate the target characters
pcTarget CHARACTER
The characters to search for, without any delimiter, e.g. " ,.-;:~r~n"
piStarting INTEGER
An integer that specifies the begin point for the search. The search is right-to-left and starts from the starting point.
Returns INTEGER
The index of the target characters or 0 when no character can be found
Top

PUBLIC CHARACTER SafeCharacterAppend (character, character)

Purpose: Provides a safe method to append into a CHARACTER value
Notes: Limits the resulting value to 31991 characters - the actual
ABL Character Limit. The resulting character value is
guaranteed to remain at maximum 31991 bytes

Parameters:
pcCharacter1 CHARACTER
The first character value
pcCharacter2 CHARACTER
The second character value
Returns CHARACTER
The resulting character value
Top

PUBLIC CHARACTER SplitText (character, character, integer, integer)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Removes white space from the resulting text parts

Parameters:
pcText CHARACTER
The source text
pcDelimiters CHARACTER
The list of word delimiters, e.g. " ,.-;:~r~n" as individual characters
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText (character, character, integer, integer, logical)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Removes white space from the resulting text parts

Parameters:
pcText CHARACTER
The source text
pcDelimiters CHARACTER
The list of word delimiters, e.g. " ,.-;:~r~n" as individual characters
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
plThrowOnTooLong LOGICAL
Throw InvalidParameterValueException when text is too long
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText (character, integer, integer)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Removes white space from the resulting text parts

Parameters:
pcText CHARACTER
The source text
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText (character, integer, integer, logical)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Removes white space from the resulting text parts

Parameters:
pcText CHARACTER
The source text
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
plThrowOnTooLong LOGICAL
Throw InvalidParameterValueException when text is too long
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText (longchar, character, integer, integer)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Removes white space from the resulting text parts

Parameters:
plcText LONGCHAR
The source text
pcDelimiters CHARACTER
The list of word delimiters, e.g. " ,.-;:~r~n" as individual characters
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText (longchar, character, integer, integer, logical)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Removes white space from the resulting text parts

Parameters:
plcText LONGCHAR
The source text
pcDelimiters CHARACTER
The list of word delimiters, e.g. " ,.-;:~r~n" as individual characters
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
plThrowOnTooLong LOGICAL
Throw InvalidParameterValueException when text is too long
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText (longchar, integer, integer)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Removes white space from the resulting text parts

Parameters:
plcText LONGCHAR
The source text
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText (longchar, integer, integer, logical)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Removes white space from the resulting text parts

Parameters:
plcText LONGCHAR
The source text
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
plThrowOnTooLong LOGICAL
Throw InvalidParameterValueException when text is too long
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText2 (character, character, integer, integer)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Leaves white space in the resulting text parts (typically at the end)

Parameters:
pcText CHARACTER
The source text
pcDelimiters CHARACTER
The list of word delimiters, e.g. " ,.-;:~r~n" as individual characters
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText2 (character, character, integer, integer, logical)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Leaves white space in the resulting text parts (typically at the end)

Parameters:
pcText CHARACTER
The source text
pcDelimiters CHARACTER
The list of word delimiters, e.g. " ,.-;:~r~n" as individual characters
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
plThrowOnTooLong LOGICAL
Throw InvalidParameterValueException when text is too long
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText2 (character, integer, integer)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Leaves white space in the resulting text parts (typically at the end)

Parameters:
pcText CHARACTER
The source text
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText2 (character, integer, integer, logical)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Leaves white space in the resulting text parts (typically at the end)

Parameters:
pcText CHARACTER
The source text
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
plThrowOnTooLong LOGICAL
Throw InvalidParameterValueException when text is too long
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText2 (longchar, character, integer, integer)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Leaves white space in the resulting text parts (typically at the end)

Parameters:
plcText LONGCHAR
The source text
pcDelimiters CHARACTER
The list of word delimiters, e.g. " ,.-;:~r~n" as individual characters
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText2 (longchar, character, integer, integer, logical)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Leaves white space in the resulting text parts (typically at the end)

Parameters:
plcText LONGCHAR
The source text
pcDelimiters CHARACTER
The list of word delimiters, e.g. " ,.-;:~r~n" as individual characters
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
plThrowOnTooLong LOGICAL
Throw InvalidParameterValueException when text is too long
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText2 (longchar, integer, integer)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Leaves white space in the resulting text parts (typically at the end)

Parameters:
plcText LONGCHAR
The source text
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER SplitText2 (longchar, integer, integer, logical)

Purpose: Splits the input text into individual lines into a CHARACTER EXTENT
Notes: Leaves white space in the resulting text parts (typically at the end)

Parameters:
plcText LONGCHAR
The source text
piLineLength INTEGER
The length of every line
piMaxLines INTEGER
The maximum number of lines of text
plThrowOnTooLong LOGICAL
Throw InvalidParameterValueException when text is too long
Returns CHARACTER
The array of text lines
Top

PUBLIC CHARACTER StringValue (Object)

Purpose: Returns the ToString() value of an object reference
Notes: Does not fail, when the object is not value, will return ? in those
cases, catches any error thrown by ToString() and will return ? on
errors too

Parameters:
poObject Progress.Lang.Object
The object reference
Returns CHARACTER
The ToString() value or ? for invalid object references
Top

PUBLIC CHARACTER StringValues (Object[])

Purpose: Returns list of the ToString() values of an array of object reference
Notes: See StringValue() method for details

Parameters:
poObjects Progress.Lang.Object
The object array
Returns CHARACTER
The comma delimited list of ToString() values or ? for invalid object references
Top

PUBLIC CHARACTER SubstituteVariable (character, integer, IVariableValueProvider)

Purpose: Substitutes the variable at the given location in the source string
Notes:

Parameters:
pcString CHARACTER
The string containing the variable name
piPosition INTEGER
The position of the @
poVariableValueProvider Consultingwerk.IVariableValueProvider
The IVariableValueProvider instance to return the variable value
Returns CHARACTER
The name of the variable
Top

PUBLIC CHARACTER Unbracket (character)

Purpose: Removes brackets from a Character String
Notes: Supports ( ) [ ] and { }

Parameters:
pcString CHARACTER
The source string to remove brackets from
Returns CHARACTER
The string without the quotes
Top

PUBLIC LONGCHAR Uncomment (longchar)

Purpose: Removes the outer-most commend of the provided string
Notes: Supports single line comments and block comments

Parameters:
plcText LONGCHAR
The source text to remove comments from
Returns LONGCHAR
The text with the comments removed
Top

PUBLIC CHARACTER Unquote (character)

Purpose: Removes quotes from a Character String
Notes:

Parameters:
pcString CHARACTER
The source string to remove quotes
Returns CHARACTER
The string without the quotes
Top

PUBLIC LONGCHAR Unquote (longchar)

Purpose: Removes quotes from a Longchar String
Notes:

Parameters:
pcString LONGCHAR
The source string to remove quotes
Returns LONGCHAR
The string without the quotes
Top

PUBLIC CHARACTER UppercaseFirstLetter (character)

Purpose: Ensures the first character is UPPER case
Notes:

Parameters:
pcString CHARACTER
The input string
Returns CHARACTER
The string with the first letter in uppercase
Top

PUBLIC CHARACTER UrlEncode (character, character)

Purpose: Encodes unsafe characters in a URL as per RFC 1738 section 2.2.
http://ds.internic.net/rfc/rfc1738.txt
Notes: See Progress K-Base 000042261, http://knowledgebase.progress.com/articles/Article/000042261

Parameters:
pcValue CHARACTER
Character string to encode
pcEnctype CHARACTER
Encoding option where "query", "cookie", "default" or any specified string of characters are valid
Returns CHARACTER
Encoded string (unknown value is returned as blank)
Top

PUBLIC CHARACTER WellFormFromCamelCase (character)

Purpose: Turns a CamelCased string into a well formed sentence (Camel Cased)
Notes:

Parameters:
pcSource CHARACTER
The source String
Returns CHARACTER
The well formed string


Constructor Detail
Top

PROTECTED StringHelper ()

Purpose: Disallow instance creation
Notes:



©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       15.04.2024 06:17:01