Skip to content

AnsiEndsStr

Check whether a string ends with a certain substring.

Declaration

Source position: strutils.pp line 61

function AnsiEndsStr(const ASubText: AnsiString; 
                    const AText: AnsiString) : Boolean;
function AnsiEndsStr(const ASubText: UnicodeString; 
                    const AText: UnicodeString) : Boolean;

Description

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

Errors

None.

See also

Name Description
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.