# String String related methods - - - ## String.Len ```pascal function String.Len(): Int32; constref; ``` Returns the length of the string - - - ## String.Pos ```pascal function String.Pos(SubStr: String): Int32; constref; ``` Returns the position of the position of the first occurance of the substring - - - ## String.PosR ```pascal function String.PosR(SubStr: String): Int32; constref; ``` Returns the position of the position of the last occurance of the substring - - - ## String.PosEx ```pascal function String.PosEx(SubStr: String): TIntegerArray; constref; ``` Returns the position of every occurance of the substring - - - ## String.Contains ```pascal function String.Contains(subString: String): Boolean; constref; ``` Returns true if the substring exists on the string. - - - ## String.ContainsAny ```pascal function String.ContainsAny(subStrings: TStringArray): Boolean; constref; ``` Returns true if any of the substrings exists on the string. - - - ## String.ContainsAll ```pascal function String.ContainsAll(subStrings: TStringArray): Boolean; constref; ``` Returns true if all of the substrings exist on the string. - - - ## String.Startswith ```pascal function String.Startswith(Prefix: String): Boolean; constref; ``` Returns `True` if the string starts with the given string `Prefix` - - - ## String.Endswith ```pascal function String.Endswith(Suffix: String): Boolean; constref; ``` Returns `True` if the string ends with the given string `Suffix` - - - ## String.Capitalize ```pascal function String.Capitalize(): String; constref; ``` Returns the string with every word captalized - - - ## String.Upper ```pascal function String.Upper(): String; constref; ``` Returns the string with every character converted to uppercase - - - ## String.Lower() ```pascal function String.Lower(): String; constref; function String.ToLower(): String; constref; ``` Returns the string with every character converted to lowercase - - - ## String.After ```pascal function String.After(SubStr: String): String; constref; ``` Copy the string from after the first occurrence of SubStr - - - ## String.Before ```pascal function String.Before(SubStr: String): String; constref; ``` Copy the string from before the first occurrence of SubStr - - - ## String.Count ```pascal function String.Count(Str: String): Int32; constref; ``` Count the number of occurrences of the given string. - - - ## String.Replace ```pascal function String.Replace(SubStr, ReplaceStr: String; Flags: TReplaceFlags=[rfReplaceAll]): String; constref; ``` Replace [all by default] occurrences of the given SubStr with with ReplaceStr - - - ## String.Split ```pascal function String.Split(delimiter: String): TStringArray; constref; ``` Split up the string at each delimiter into smaller strings - - - ## String.Trim ```pascal function String.Trim(chars:String = STR_WHITESPACE): String; constref; function String.Strip(chars:String = STR_WHITESPACE): String; constref; ``` Return a copy of the string with leading and trailing characters removed. - - - ## String.IsAlphaNum ```pascal function String.IsAlphaNum(): Boolean; constref; ``` Test if a string only contains alpha numerical characters. - - - ## String.IsDigit ```pascal function String.IsDigit(): Boolean; constref; ``` Test if a sting is a digit - - - ## String.IsFloat ```pascal function String.IsFloat(): Boolean; constref; ``` Test if a string is a floating point number - - - ## String.IsAlpha ```pascal function String.IsAlpha(): Boolean; constref; ``` Test if a string only contains letters a-zA-Z - - - ## String.ExtractNumbers ```pascal function String.ExtractNumbers(): TExtendedArray; constref; ``` Extract all the numbers found in the string, as there could be floating point numbers as well it reutnrs a TExtendedArray. - - - ## String.ExtractNumbersEx ```pascal function String.ExtractNumbersEx(): TExtendedArray; constref; ``` Extract all the numbers found in the string, this time every number ends up in each their index. For example ``'1234'`` would return ``[1,2,3,4]`` - - - ## String.FileExt ```pascal function String.FileExt(): String; constref; ``` Returns the file extension - - - ## String.FileName ```pascal function String.FileName(): String; constref; ``` Returns the file name - - - ## String.Hex ```pascal function String.Hex(): string; constref; ``` Returns the hexadecimal value that represents the string. - - - ## operator string * int32 ```pascal operator * (left:String; Right:Int32): String; ``` Replicates the string the given amount of times. So ``'ho!' * 3`` would generate ``ho!ho!ho!`` - - - ## operator string in string ```pascal operator in (left:String; Right:String): Boolean; ``` Returns ``True`` if the string exists in the other string. So ``'hell' in 'hello world'`` would be ``True``