[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'LazStringUtils' (#lazutils)

LazStartsStr

Determines if a string starts with the specified value.

Declaration

Source position: lazstringutils.pas line 40

function LazStartsStr(

  const ASubText: string;

  const AText: string

):Boolean;

Arguments

ASubText

  

Value to look for at the start of the text.

AText

  

Text examined in the routine.

Function result

True when the string starts with the specified sub-text.

Description

LazStartsStr is a Boolean function used to determine if the string in AText starts with the text specified in ASubText. It is a modified version of StartsStr from the RTL strutils.pp unit.

LazStartsStr casts the values in ASubText and AText to PChar types, and calls StrLComp to perform the comparison.

The returns value is True when AText begins with the specified sub-text. It also returns True when ASubText is an empty string (''), which is Delphi compatible.

See also

LazEndsStr

  

Determines if a string ends with the specified value.

LazStartsText

  

Determines if a string occurs at the beginning of the specified text.


Version 4.0 Generated 2025-05-03 Home