System.AnsiStrings.StrLComp
Delphi
function StrLComp(const Str1, Str2: PAnsiChar; MaxLen: Cardinal): Integer;
C++
extern DELPHI_PACKAGE int __fastcall StrLComp(const char * Str1, const char * Str2, unsigned MaxLen)/* overload */;
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | System.AnsiStrings.pas System.AnsiStrings.hpp |
System.AnsiStrings | System.AnsiStrings |
Description
Compare dans deux chaînes un nombre de caractères au plus égal à un maximum spécifié.
StrLComp compare Str1 à Str2, jusqu'à la longueur maximum de MaxLen caractères. La valeur renvoyée est indiquée dans le tableau suivant :
Valeur renvoyée | Condition |
---|---|
<0 |
Str1 avant Str2 |
=0 |
Str1 identique à Str2 |
>0 |
Str1 après Str2 |
Remarque : Lorsque vous utilisez des caractères internationaux, servez-vous plutôt de AnsiStrLComp.