Sign in Join
FPDoc Onlineexperiment

AnsiEndsText function

In unit StrUtils

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

Declaration

pascal
function AnsiEndsText(const ASubText: AnsiString; 
 const AText: AnsiString): Boolean

Arguments

ASubText

Substring to check for.

AText

Text to check the end of.

Function result

True if the string ends on the substring, False otherwise.

Description

AnsiEndsText checks AText to see whether it ends with ASubText , and returns True if it does, False if not. The check is performed case-insensitive. Basically, it checks whether the position of ASubText equals the length of AText minus the length of ASubText plus one.

Errors

None

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.