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



Top Method Summary
Options Name Purpose
+ 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
+ LOGICAL ContainsAnyStringOf (longchar, character[]) Returns true when the source string contains at least one of the target strings
+ INTEGER CountOccurencesOf (character, character) Counts the occurences of the given target string in the source string
+ LOGICAL Ends (character, character) Returns TRUE when the given source string ends in the ending string
+ CHARACTER EscapeBackslash (character) Ensures that any backslash in the input character value is escaped When the backslash is prefixed by the tilda ~ , no further action is taken. Otherwise a ~ is inserted
+ CHARACTER EscapeCurlyBraces (character) Escapes unescaped Curly Braces in the given string with a tilda. This may be required for dynamic query strings
+ 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 (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
+ 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
+ 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 (longchar) Returns position of the next non whispace character
+ INTEGER NextNonWhiteSpaceCharacter (longchar, integer) Returns position of the next non whispace character
+ LONGCHAR PrefixLines (longchar, character) Prefixes every line in the given LONGCHAR with a given CHARACTR
+ 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 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 '
+ 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 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 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 enforece 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 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 occurences of the given target string in the source string
Notes: Does ignore occurences within quotes

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

PUBLIC LOGICAL Ends (character, character)

Purpose: Returns TRUE when the given source string ends in the ending string
Notes: Equivalint 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 CHARACTER EscapeBackslash (character)

Purpose: Ensures that any backslash in the input character value is escaped
When the backslash is prefixed by the tilda ~ , 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 tilda
Returns CHARACTER
The escaped string
Top

PUBLIC CHARACTER EscapeCurlyBraces (character)

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

Parameters:
pcString CHARACTER
The string in which to escape tildas
Returns CHARACTER
The resulting string
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 (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 eigth 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 eigth string
pcString9 CHARACTER
The nineth 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 eigth string
pcString9 CHARACTER
The nineth 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 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 qoutes

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 qoutes

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 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 (longchar)

Purpose: Returns position of the next non whispace 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 whispace 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 LONGCHAR PrefixLines (longchar, character)

Purpose: Prefixes every line in the given LONGCHAR with a given CHARACTR
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 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 strging 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 strging 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 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 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 uppercased
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 (unkown 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-2019 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.08.2019 23:57:52