Unit 'StrUtils' Package
[Overview][Resource strings][Constants][Types][Procedures and functions][Index] [#rtl]

AnsiEndsText

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

Declaration

Source position: strutils.pp line 40

function AnsiEndsText(

  const ASubText: AnsiString;

  const AText: AnsiString

):Boolean;

function AnsiEndsText(

  const ASubText: UnicodeString;

  const AText: UnicodeString

):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.

Arguments

ASubText

  

Substring to check for.

AText

  

Text to check the end of.

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-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

AnsiStartsText

  

Check whether a string starts with a given substring, ignoring case.

AnsiEndsStr

  

Check whether a string ends with a certain substring.

AnsiIndexText

  

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

AnsiContainsText

  

Check whether a string contains a certain substring, ignoring case.


Documentation generated on: Nov 23 2024