[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

TStringHelper

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Helper type for strings.

Declaration

Source position: syshelph.inc line 40

type TStringHelper = type helper

public

Const

  Empty = ''

  

Check if the string is empty

  class function Compare();

  

Compare 2 strings

  class function CompareOrdinal();

  

Compare 2 strings byte for byte

  class function CompareText();

  

Compare 2 strings case insensitively.

  class function Copy();

  

Return a unique copy of a string

  class function Create();

  

Create a new string

  class function EndsText();

  

Check if one string is the ending of another.

  class function Equals();

  

Check if 2 strings are equal

  class function Format();

  

Format a string using provided arguments.

  class function IsNullOrEmpty();

  

Check if a string is empty

  class function IsNullOrWhiteSpace();

  

Check if a string is empty or contains only whitespace characters.

  class function Join();

  

Join a series of strings, separated using a given separator

  class function LowerCase(); overload;

  

Return the lowercase version of a string.

  class function Parse();

  

Return a string representation of the argument

  class function ToBoolean();

  

Convert string to boolean

  class function ToDouble();

  

Convert string to double-sized floating point value

  class function ToExtended();

  

Convert string to extended-sized floating point value

  class function ToInt64();

  

Convert string to 64-bit signed integer

  class function ToInteger();

  

Convert string to 32-bit signed integer

  class function ToSingle();

  

Convert string to single-sized floating point value

  class function UpperCase(); overload;

  

Return uppercase version of a string

  function CompareTo();

  

Compare string to another

  function Contains();

  

Check is the string contains another

  procedure CopyTo();

  

Copy part of the string to an array of characters

  function CountChar();

  

Count the occurrences of a character

  function DeQuotedString();

  

Return a dequoted version of the string

  function EndsWith();

  

Check if the string is ended by another.

  function GetHashCode;

  

Get a hash code for the string

  function IndexOf();

  

Find the position (index) of a string or character

  function IndexOfUnQuoted(); overload;

  

Index of string, skipping quoted parts.

  function IndexOfAny();

  

Find the position (index) of any string or character in a list.

  function IndexOfAnyUnquoted();

  

Find the position (index) of any string or character in a list.

  function Insert();

  

Insert a string at a given position

  function IsDelimiter();

  

Check whether a character at a given position is a delimiter

  function IsEmpty;

  

Check whether the string is empty.

  function LastDelimiter();

  

Return the last position of one of a series of delimiters

  function LastIndexOf();

  

Find the last position (index) of a string or character

  function LastIndexOfAny();

  

Find the last position (index) of any string or character in a list.

  function PadLeft();

  

Pad the string on the left with an indicated character

  function PadRight();

  

Pad the string on the right with an indicated character

  function QuotedString();

  

Return a quoted version of the string

  function Remove();

  

Remove a number of characters from the string

  function Replace();

  

Replace occurrences of one string with another.

  function Split();

  

Split a string in a number of parts

  function StartsWith();

  

Check if one string starts with another

  function Substring();

  

Return a part of the string

  function ToCharArray();

  

Return the string ar an array of characters.

  function ToLower; overload;

  

Convert to lowercase

  function ToLowerInvariant;

  

Convert to lowercase

  function ToUpper; overload;

  

Convert to uppercase.

  function ToUpperInvariant;

  

Convert to uppercase

  function Trim();

  

Strips a set of trim characters from the beginning and end of the string.

  function TrimLeft();

  

Strips a set of trim characters from the beginning of the string.

  function TrimRight();

  

Strips a set of trim characters from the end of the string.

  function TrimEnd(); deprecated ;

  

Alias for TrimRight

  function TrimStart(); deprecated ;

  

Alias for TrimLeft

  property Chars []: Char; [r]

  

Zero-based Indexed access to the characters in the string.

  property Length: Integer; [r]

  

Return the length of the string

end;

Inheritance

TStringHelper

  

Helper type for strings.

Description

TStringHelper adds various helper routines to the string type. These are mostly conversion routines, and some formatting routines.

For similarity to C-like languages, all the indexes in these helper routines are zero based.

See also

TGUIDHelper

  

Helper type for TGUID


Documentation generated on: Sep 28 2017