<div dir="ltr"><div class="gmail_extra">If anyone was interested in the subject, here is what I came up with after merging my string centric functions into record helpers:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">type</div><div class="gmail_extra">  StringArrayHelper = record helper for StringArray</div><div class="gmail_extra">    { Join a string array into a string using a separator }</div><div class="gmail_extra">    function Join(const Separator: string): string;</div><div class="gmail_extra">  end</div><div class="gmail_extra"><br></div><div class="gmail_extra">{ IntArrayHelper }</div><div class="gmail_extra"><br></div><div class="gmail_extra">  IntArrayHelper = record helper for StringArray</div><div class="gmail_extra">    { Join an int array into a string using a separator }</div><div class="gmail_extra">    function Join(const Separator: string): string;</div><div class="gmail_extra">  end</div><div class="gmail_extra"><br></div><div class="gmail_extra">{ StringHelper }</div><div class="gmail_extra"><br></div><div class="gmail_extra">  StringHelper = record helper for string</div><div class="gmail_extra">  private</div><div class="gmail_extra">    function GetIsEmpty: Boolean;</div><div class="gmail_extra">    function GetIsWhitespace: Boolean;</div><div class="gmail_extra">    function GetIsIdentifier: Boolean;</div><div class="gmail_extra">    function GetIsAttribute: Boolean;</div><div class="gmail_extra">    function GetLength: Integer;</div><div class="gmail_extra">    procedure SetLength(Value: Integer);</div><div class="gmail_extra">  public</div><div class="gmail_extra">    { Repeat a character a given length a into string }</div><div class="gmail_extra">    procedure CharInto(C: Char; Len: Integer);</div><div class="gmail_extra">    { Copy a memory buffer into string }</div><div class="gmail_extra">    procedure CopyInto(P: Pointer; Len: Integer);</div><div class="gmail_extra">    { Inserts a substring at a position into string }</div><div class="gmail_extra">    procedure InsertInto(const SubStr: string; Position: Integer);</div><div class="gmail_extra">    { Returns true if a string matches a case insensitive value }</div><div class="gmail_extra">    function Equals(const Value: string): Boolean; overload;</div><div class="gmail_extra">    { Returns true if a string matches any in a set of case insensitive values }</div><div class="gmail_extra">    function Equals(const Values: array of string): Boolean; overload;</div><div class="gmail_extra">    { Compares two strings optionally ignoring case returning -1 if string comes before</div><div class="gmail_extra">      before value, 1 if string comes after value, ord 0 if string and value are equal }</div><div class="gmail_extra">    function Compare(const Value: string; IgnoreCase: Boolean = False): Integer;</div><div class="gmail_extra">    { Convert a string to uppercase }</div><div class="gmail_extra">    function ToUpper: string;</div><div class="gmail_extra">    { Convert a string to lowercase }</div><div class="gmail_extra">    function ToLower: string;</div><div class="gmail_extra">    { Copies a substring given a start and length }</div><div class="gmail_extra">    function Copy(Start: Integer; Len: Integer = 0): string;</div><div class="gmail_extra">    { Searches a string for a substring optionally ignoring case }</div><div class="gmail_extra">    function IndexOf(const SubStr: string; IgnoreCase: Boolean = False): Integer; overload;</div><div class="gmail_extra">    { Searches a string for a substring from a start position optionally ignoring case }</div><div class="gmail_extra">    function IndexOf(const SubStr: string; Start: Integer; IgnoreCase: Boolean = False): Integer; overload;</div><div class="gmail_extra">    { Returns the number of a substring matches within a string }</div><div class="gmail_extra">    function MatchCount(const SubStr: string; IgnoreCase: Boolean = False): Integer;</div><div class="gmail_extra">    { Returns an array of indices of a substring matches within a string }</div><div class="gmail_extra">    function MatchIndices(const SubStr: string; IgnoreCase: Boolean = False): IntArray;</div><div class="gmail_extra">    { Replaces every instance of a pattern in a string }</div><div class="gmail_extra">    function Replace(const OldPattern, NewPattern: string; IgnoreCase: Boolean = False): string;</div><div class="gmail_extra">    { Replaces the first instance of a pattern in a string }</div><div class="gmail_extra">    function ReplaceOne(const OldPattern, NewPattern: string; IgnoreCase: Boolean = False): string;</div><div class="gmail_extra">    { Replaces everything aftger the first instance of a pattern in a string }</div><div class="gmail_extra">    function ReplaceAfter(const OldPattern, NewPattern: string; IgnoreCase: Boolean = False): string;</div><div class="gmail_extra">    { Trims white space from both sides of a string }</div><div class="gmail_extra">    function Trim: string;</div><div class="gmail_extra">    { Returns the index of a string in a string array or -1 if there is no match }</div><div class="gmail_extra">    function ArrayIndex(const Values: array of string): Integer;</div><div class="gmail_extra">    { Splits a string into a string array using a separator }</div><div class="gmail_extra">    function Split(Separator: string): StringArray;</div><div class="gmail_extra">    { Splits a string into a int array using a separator }</div><div class="gmail_extra">    function SplitInt(const Separator: string): IntArray;</div><div class="gmail_extra">    { Splits a string into a int64 array using a separator }</div><div class="gmail_extra">    function SplitInt64(const S, Separator: string): Int64Array;</div><div class="gmail_extra">    { Returns the first subsection of a string if it were split using a separator }</div><div class="gmail_extra">    function FirstOf(Separator: string): string;</div><div class="gmail_extra">    { Returns the second subsection of a string if it were split using a separator }</div><div class="gmail_extra">    function SecondOf(Separator: string): string;</div><div class="gmail_extra">    { Returns the last subsection of a string if it were split using a separator }</div><div class="gmail_extra">    function LastOf(Separator: string): string;</div><div class="gmail_extra">    { Search a string for a substring optionally ignoring case }</div><div class="gmail_extra">    function Contains(SubStr: string; IgnoreCase: Boolean = False): Boolean;</div><div class="gmail_extra">    { Returns true if a string begins with a substring while optionally ignoring case }</div><div class="gmail_extra">    function BeginsWith(SubStr: string; IgnoreCase: Boolean = False): Boolean;</div><div class="gmail_extra">    { Returns true if a string end with a substring while optionally ignoring case }</div><div class="gmail_extra">    function EndsWith(SubStr: string; IgnoreCase: Boolean = False): Boolean;</div><div class="gmail_extra">    { Returns a string made to fit a given length padded on the left with a character }</div><div class="gmail_extra">    function PadLeft(C: Char; Len: Integer): string;</div><div class="gmail_extra">    { Returns a string made to fit a given length padded on the right with a character }</div><div class="gmail_extra">    function PadRight(C: Char; Len: Integer): string;</div><div class="gmail_extra">    { Returns a string surrounded by quotes if it contains whitespace }</div><div class="gmail_extra">    function Quote: string;</div><div class="gmail_extra">    { Analyze a string and find its line break style }</div><div class="gmail_extra">    function LineBreakStyle: TTextLineBreakStyle;</div><div class="gmail_extra">    { Converts the line break style of a string to a the desired style }</div><div class="gmail_extra">    function AdjustLineBreaks(Style: TTextLineBreakStyle): string; overload;</div><div class="gmail_extra">    { Converts the line break style of a string to the system preferred defined style }</div><div class="gmail_extra">    function AdjustLineBreaks: string; overload;</div><div class="gmail_extra">    { Gets true if a string contains only whitespace characters }</div><div class="gmail_extra">    property IsEmpty: Boolean read GetIsEmpty;</div><div class="gmail_extra">    { Gets true if a string contains only whitespace characters }</div><div class="gmail_extra">    property IsWhitespace: Boolean read GetIsWhitespace;</div><div class="gmail_extra">    { Gets true if a string matches to rules of an identifier }</div><div class="gmail_extra">    property IsIdentifier: Boolean read GetIsIdentifier;</div><div class="gmail_extra">    { Gets true if a string matches to rules of an attribute }</div><div class="gmail_extra">    property IsAttribute: Boolean read GetIsAttribute;</div><div class="gmail_extra">    {  Gets or sets the length allocated for the string }</div><div class="gmail_extra">    property Length: Boolean read GetLength write SetLength;</div><div class="gmail_extra">  end;</div><div><br></div></div></div>