TShortStringHelper¶
Declaration¶
Source position: syshelph.inc line 520
type
TShortStringHelper = type helper for ShortString
public
const
Empty = '';
class function Compare(const A: ShortString; const B: ShortString)
: Integer; overload;
class function Compare(const A: ShortString; const B: ShortString;
IgnoreCase: Boolean) : Integer; overload;
class function Compare(const A: ShortString; const B: ShortString;
Options: TCompareOptions) : Integer; overload;
class function Compare(const A: ShortString; IndexA: SizeInt;
const B: ShortString; IndexB: SizeInt;
ALen: SizeInt) : Integer; overload;
class function Compare(const A: ShortString; IndexA: SizeInt;
const B: ShortString; IndexB: SizeInt;
ALen: SizeInt; IgnoreCase: Boolean) : Integer; overload;
class function Compare(const A: ShortString; IndexA: SizeInt;
const B: ShortString; IndexB: SizeInt;
ALen: SizeInt; Options: TCompareOptions) : Integer; overload;
class function CompareOrdinal(const A: ShortString;
const B: ShortString) : Integer; overload;
class function CompareOrdinal(const A: ShortString; IndexA: SizeInt;
const B: ShortString; IndexB: SizeInt;
ALen: SizeInt) : Integer; overload;
class function CompareText : Integer;
class function Copy : ShortString;
class function Create(AChar: AnsiChar; ACount: SizeInt) : ShortString; overload;
class function Create(const AValue: Array of AnsiChar = char)
: ShortString; overload;
class function Create(const AValue: Array of AnsiChar = char;
StartIndex: SizeInt; ALen: SizeInt) : ShortString; overload;
class function EndsText : Boolean;
class function Equals(const a: ShortString; const b: ShortString)
: Boolean; overload;
function Equals(const AValue: ShortString; IgnoreCase: Boolean=False)
: Boolean; overload;
class function Format(const AFormat: ShortString;
const args: Array of const) : ShortString; overload;
function Format(const args: Array of const) : ShortString; overload;
class function IsNullOrEmpty : Boolean;
class function IsNullOrWhiteSpace : Boolean;
class function Join(const Separator: ShortString;
const Values: Array of const) : ShortString; overload;
class function Join(const Separator: ShortString;
const Values: Array of ShortString) : ShortString; overload;
class function Join(const Separator: ShortString;
const Values: Array of ShortString;
StartIndex: SizeInt; ACount: SizeInt) : ShortString; overload;
class function LowerCase : ShortString; overload;
class function Parse(const AValue: Boolean) : ShortString; overload;
class function Parse(const AValue: Extended) : ShortString; overload;
class function Parse(const AValue: Int64) : ShortString; overload;
class function Parse(const AValue: Integer) : ShortString; overload;
class function ToBoolean(const S: ShortString) : Boolean; overload;
function ToBoolean : Boolean; overload;
class function ToDouble(const S: ShortString) : Double; overload;
function ToDouble : Double; overload;
class function ToExtended(const S: ShortString) : Extended; overload;
function ToExtended : Extended; overload;
class function ToInt64(const S: ShortString) : Int64; overload;
function ToInt64 : Int64; overload;
class function ToInteger(const S: ShortString) : Integer; overload;
function ToInteger : Integer; overload;
class function ToSingle(const S: ShortString) : Single; overload;
function ToSingle : Single; overload;
class function UpperCase : ShortString; overload;
function CompareTo : Integer;
function Contains : Boolean;
procedure CopyTo;
function CountChar : SizeInt;
function DeQuotedString : ShortString; overload;
function DeQuotedString(const AQuoteChar: AnsiChar) : ShortString; overload;
function EndsWith(const AValue: ShortString) : Boolean; overload;
function EndsWith(const AValue: ShortString; IgnoreCase: Boolean)
: Boolean; overload;
function GetHashCode : Integer;
function IndexOf(AValue: AnsiChar) : SizeInt; overload;
function IndexOf(const AValue: ShortString) : SizeInt; overload;
function IndexOf(AValue: AnsiChar; StartIndex: SizeInt) : SizeInt; overload;
function IndexOf(const AValue: ShortString; StartIndex: SizeInt)
: SizeInt; overload;
function IndexOf(AValue: AnsiChar; StartIndex: SizeInt; ACount: SizeInt)
: SizeInt; overload;
function IndexOf(const AValue: ShortString; StartIndex: SizeInt;
ACount: SizeInt) : SizeInt; overload;
function IndexOfUnQuoted : SizeInt; overload;
function IndexOfAny(const AnyOf: Array of AnsiChar = char) : SizeInt; overload;
function IndexOfAny(const AnyOf: Array of AnsiChar = char;
StartIndex: SizeInt) : SizeInt; overload;
function IndexOfAny(const AnyOf: Array of AnsiChar = char;
StartIndex: SizeInt; ACount: SizeInt) : SizeInt; overload;
function IndexOfAny(const AnyOf: Array of ShortString) : SizeInt; overload;
function IndexOfAny(const AnyOf: Array of ShortString;
StartIndex: SizeInt) : SizeInt; overload;
function IndexOfAny(const AnyOf: Array of ShortString;
StartIndex: SizeInt; ACount: SizeInt) : SizeInt; overload;
function IndexOfAny(const AnyOf: Array of ShortString;
StartIndex: SizeInt; ACount: SizeInt;
out AMatch: SizeInt) : SizeInt; overload;
function IndexOfAnyUnquoted(const AnyOf: Array of AnsiChar = char;
StartQuote: AnsiChar; EndQuote: AnsiChar)
: SizeInt; overload;
function IndexOfAnyUnquoted(const AnyOf: Array of AnsiChar = char;
StartQuote: AnsiChar; EndQuote: AnsiChar;
StartIndex: SizeInt) : SizeInt; overload;
function IndexOfAnyUnquoted(const AnyOf: Array of AnsiChar = char;
StartQuote: AnsiChar; EndQuote: AnsiChar;
StartIndex: SizeInt; ACount: SizeInt)
: SizeInt; overload;
function IndexOfAnyUnquoted(const AnyOf: Array of ShortString;
StartQuote: AnsiChar; EndQuote: AnsiChar;
StartIndex: SizeInt; out Matched: SizeInt)
: SizeInt; overload;
function Insert : ShortString;
function IsDelimiter : Boolean;
function IsEmpty : Boolean;
function LastDelimiter : SizeInt;
function LastIndexOf(AValue: AnsiChar) : SizeInt; overload;
function LastIndexOf(const AValue: ShortString) : SizeInt; overload;
function LastIndexOf(AValue: AnsiChar; AStartIndex: SizeInt) : SizeInt; overload;
function LastIndexOf(const AValue: ShortString; AStartIndex: SizeInt)
: SizeInt; overload;
function LastIndexOf(AValue: AnsiChar; AStartIndex: SizeInt;
ACount: SizeInt) : SizeInt; overload;
function LastIndexOf(const AValue: ShortString; AStartIndex: SizeInt;
ACount: SizeInt) : SizeInt; overload;
function LastIndexOfAny(const AnyOf: Array of AnsiChar = char) : SizeInt; overload;
function LastIndexOfAny(const AnyOf: Array of AnsiChar = char;
AStartIndex: SizeInt) : SizeInt; overload;
function LastIndexOfAny(const AnyOf: Array of AnsiChar = char;
AStartIndex: SizeInt; ACount: SizeInt) : SizeInt; overload;
function PadLeft(ATotalWidth: SizeInt) : ShortString; overload;
function PadLeft(ATotalWidth: SizeInt; PaddingChar: AnsiChar)
: ShortString; overload;
function PadRight(ATotalWidth: SizeInt) : ShortString; overload;
function PadRight(ATotalWidth: SizeInt; PaddingChar: AnsiChar)
: ShortString; overload;
function QuotedString : ShortString; overload;
function QuotedString(const AQuoteChar: AnsiChar) : ShortString; overload;
function Remove(StartIndex: SizeInt) : ShortString; overload;
function Remove(StartIndex: SizeInt; ACount: SizeInt) : ShortString; overload;
function Replace(OldChar: AnsiChar; NewChar: AnsiChar) : ShortString; overload;
function Replace(OldChar: AnsiChar; NewChar: AnsiChar;
ReplaceFlags: TReplaceFlags) : ShortString; overload;
function Replace(const OldValue: ShortString;
const NewValue: ShortString) : ShortString; overload;
function Replace(const OldValue: ShortString;
const NewValue: ShortString;
ReplaceFlags: TReplaceFlags) : ShortString; overload;
function Split(const Separators: Array of AnsiChar = char)
: TShortStringArray; overload;
function Split(const Separators: Array of AnsiChar = char;
ACount: SizeInt) : TShortStringArray; overload;
function Split(const Separators: Array of AnsiChar = char;
Options: TStringSplitOptions) : TShortStringArray; overload;
function Split(const Separators: Array of AnsiChar = char;
ACount: SizeInt; Options: TStringSplitOptions)
: TShortStringArray; overload;
function Split(const Separators: Array of ShortString)
: TShortStringArray; overload;
function Split(const Separators: Array of ShortString; ACount: SizeInt)
: TShortStringArray; overload;
function Split(const Separators: Array of ShortString;
Options: TStringSplitOptions) : TShortStringArray; overload;
function Split(const Separators: Array of ShortString; ACount: SizeInt;
Options: TStringSplitOptions) : TShortStringArray; overload;
function Split(const Separators: Array of AnsiChar = char;
AQuote: AnsiChar) : TShortStringArray; overload;
function Split(const Separators: Array of AnsiChar = char;
AQuoteStart: AnsiChar; AQuoteEnd: AnsiChar)
: TShortStringArray; overload;
function Split(const Separators: Array of AnsiChar = char;
AQuoteStart: AnsiChar; AQuoteEnd: AnsiChar;
Options: TStringSplitOptions) : TShortStringArray; overload;
function Split(const Separators: Array of AnsiChar = char;
AQuoteStart: AnsiChar; AQuoteEnd: AnsiChar;
ACount: SizeInt) : TShortStringArray; overload;
function Split(const Separators: Array of AnsiChar = char;
AQuoteStart: AnsiChar; AQuoteEnd: AnsiChar;
ACount: SizeInt; Options: TStringSplitOptions)
: TShortStringArray; overload;
function Split(const Separators: Array of ShortString; AQuote: AnsiChar)
: TShortStringArray; overload;
function Split(const Separators: Array of ShortString;
AQuoteStart: AnsiChar; AQuoteEnd: AnsiChar)
: TShortStringArray; overload;
function Split(const Separators: Array of ShortString;
AQuoteStart: AnsiChar; AQuoteEnd: AnsiChar;
Options: TStringSplitOptions) : TShortStringArray; overload;
function Split(const Separators: Array of ShortString;
AQuoteStart: AnsiChar; AQuoteEnd: AnsiChar;
ACount: SizeInt) : TShortStringArray; overload;
function Split(const Separators: Array of ShortString;
AQuoteStart: AnsiChar; AQuoteEnd: AnsiChar;
ACount: SizeInt; Options: TStringSplitOptions)
: TShortStringArray; overload;
function StartsWith(const AValue: ShortString) : Boolean; overload;
function StartsWith(const AValue: ShortString; IgnoreCase: Boolean)
: Boolean; overload;
function Substring(AStartIndex: SizeInt) : ShortString; overload;
function Substring(AStartIndex: SizeInt; ALen: SizeInt) : ShortString; overload;
function ToCharArray : TCharArray; overload;
function ToCharArray(AStartIndex: SizeInt; ALen: SizeInt) : TCharArray; overload;
function ToLower : ShortString; overload;
function ToLowerInvariant : ShortString;
function ToUpper : ShortString; overload;
function ToUpperInvariant : ShortString;
function Trim : ShortString; overload;
function Trim(const ATrimChars: Array of AnsiChar = char) : ShortString; overload;
function TrimLeft : ShortString; overload;
function TrimLeft(const ATrimChars: Array of AnsiChar = char)
: ShortString; overload;
function TrimRight : ShortString; overload;
function TrimRight(const ATrimChars: Array of AnsiChar = char)
: ShortString; overload;
function TrimEnd : ShortString;
function TrimStart : ShortString;
property Chars[AIndex : SizeInt = Int64]: AnsiChar; {r}
property &Length: SizeInt; {r}
end;
Inheritance¶
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Compare | public | |
| CompareOrdinal | public | |
| CompareText | public | |
| CompareTo | public | |
| Contains | public | |
| Copy | public | |
| CopyTo | public | |
| CountChar | public | |
| Create | public | |
| DeQuotedString | public | |
| EndsText | public | |
| EndsWith | public | |
| Equals | public | |
| Format | public | |
| GetHashCode | public | |
| IndexOf | public | |
| IndexOfAny | public | |
| IndexOfAnyUnquoted | public | |
| IndexOfUnQuoted | public | |
| Insert | public | |
| IsDelimiter | public | |
| IsEmpty | public | |
| IsNullOrEmpty | public | |
| IsNullOrWhiteSpace | public | |
| Join | public | |
| LastDelimiter | public | |
| LastIndexOf | public | |
| LastIndexOfAny | public | |
| LowerCase | public | |
| PadLeft | public | |
| PadRight | public | |
| Parse | public | |
| QuotedString | public | |
| Remove | public | |
| Replace | public | |
| Split | public | |
| StartsWith | public | |
| Substring | public | |
| ToBoolean | public | |
| ToCharArray | public | |
| ToDouble | public | |
| ToExtended | public | |
| ToInt64 | public | |
| ToInteger | public | |
| ToLower | public | |
| ToLowerInvariant | public | |
| ToSingle | public | |
| ToUpper | public | |
| ToUpperInvariant | public | |
| Trim | public | |
| TrimEnd | public | |
| TrimLeft | public | |
| TrimRight | public | |
| TrimStart | public | |
| UpperCase | public |