System.SysUtils.TStringHelper.StartsText
Delphi
class function StartsText(const ASubText, AText: string): Boolean; static;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas | System.SysUtils | TStringHelper |
Description
Returns True
if the given string starts with the given substring.
StartsText is a static function that can be called like this:
var
MyString: String;
begin
MyString := 'This is a string.';
Writeln(Boolean(String.StartsText('This ', MyString)));
end.
Output:
TRUE
Tip: StartsText is case-insensitive.