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

AnsiEndsStr

Check whether a string ends with a certain substring

Declaration

Source position: strutils.pp line 43

function AnsiEndsStr(

  const ASubText: String;

  const AText: String

):Boolean;

Arguments

ASubText

  

Substring to check for.

AText

  

Text to check the end of

Function result

Trueif the string ends on the substring, Falseotherwise.

Description

AnsiEndsStrchecks ATextto see whether it ends with ASubText, and returns Trueif it does, Falseif not. The check is performed case-sensitive. Basically, it checks whether the position of ASubTextequals the length of ATextminus the length of ASubTextplus one.

Errors

None.

See also

AnsiEndsText

  

Check whether a string ends with a certain substring, ignoring case.

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