[Overview][Constants][Types][Procedures and functions] Reference for unit 'strutils' (#rtl)

AnsiStartsStr

Check whether a string starts with a given substring, observing case

Declaration

Source position: strutils.pp line 42

function AnsiStartsStr(

  const ASubText: String;

  const AText: String

):Boolean;

Arguments

ASubText

  

Substring to check for

AText

  

String to check in

Function result

Trueif the given string starts with the substring, Falseif not.

Description

AnsiStartsStrchecks ATextto see whether it starts with ASubText, and returns Trueif it does, Falseif not. The check is performed case-sensitive. Basically, it checks whether the position of ASubTextequals 1.

See also

AnsiEndsStr

  

Check whether a string ends with a certain substring

AnsiStartsStr

  

Check whether a string starts with a given substring, observing case

AnsiIndexStr

  

Searches, observing case, for a string in an array of strings.

AnsiContainsStr

  

Checks whether a string contains a given substring