[Overview][Constants][Types][Procedures and functions][Index] |
Determines if a string occurs at the beginning of the specified text.
Source position: lazstringutils.pas line 42
function LazStartsText( |
const ASubText: string; |
const AText: string |
):Boolean; |
ASubText |
|
Value to locate at the start of the string. |
AText |
|
String value used in the comparison. |
True when the sub-text is at the start of the string value.
LazStartsText is a fast implementation of StartsText. The version in the RTL strutils.pp unit calls AnsiCompareText and is very slow.
LazStartsText casts the values in ASubText and AText to PChar types, and calls StrLIComp to perform a case-insensitive comparison for the number of characters in ASubText.
The return value is True when ASubText and AText start with the same values. The return value is also True when ASubText is an empty string (''); this is Delphi compatible. The return value is False when StrLIComp returns a non-zero value.
Version 4.0 | Generated 2025-05-03 | Home |