Afficher : Delphi C++
Préférences d'affichage

System.SysUtils.StrLComp

De XE2 API Documentation

Delphi

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

C++

extern PACKAGE int __fastcall StrLComp(const char * Str1, const char * Str2, unsigned MaxLen)/* overload */;

Propriétés

Type Visibilité  Source Unité  Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

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.

Voir aussi

Versions précédentes
Traductions