From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function StrLComp(const Str1, Str2: PAnsiChar; MaxLen: Cardinal): Integer;
function StrLComp(const Str1, Str2: PWideChar; MaxLen: Cardinal): Integer;


extern DELPHI_PACKAGE int __fastcall StrLComp _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (const char * Str1, const char * Str2, unsigned MaxLen)/* overload */;


Type Visibility Source Unit Parent
function public
System.SysUtils System.SysUtils


Warning: Ansi version of StrLComp is deprecated. Please use AnsiStrings unit.

Compares up to a specified maximum number of characters in two strings.

StrLComp compares Str1 to Str2, up to a maximum length of MaxLen characters. The return value is indicated in the following table.

Return value Condition


Str1 sorts before Str2.


Str1 is the same as Str2.


Str1 sorts after Str2.

Note: When working with international characters, use AnsiStrLComp instead.

See Also

Code Examples