System.StrUtils.SearchBuf

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

function SearchBuf(Buf: PAnsiChar; BufLen: Integer; SelStart, SelLength: Integer;
SearchString: AnsiString; Options: TStringSearchOptions): PAnsiChar;
function SearchBuf(Buf: PChar; BufLen: Integer; SelStart, SelLength: Integer;
SearchString: string; Options: TStringSearchOptions): PChar;

C++

extern DELPHI_PACKAGE char * __fastcall SearchBuf _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (char * Buf, int BufLen, int SelStart, int SelLength, System::AnsiString SearchString, TStringSearchOptions Options = (TStringSearchOptions() << TStringSeachOption::soDown ))/* overload */;

Propriétés

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

Description

Recherche une sous-chaîne dans un tampon de texte.

Appelez SearchBuf pour rechercher dans un tampon de texte une chaîne spécifiée.

Buf représente le tampon de texte dans lequel effectuer la recherche.

BufLen désigne la longueur, en octets, de Buf.

SelStart est le premier caractère de la recherche lorsque Options indique une recherche en arrière (valeur frDown non incluse). Le premier caractère de Buf possède la position 0.

SelLength représente le nombre de caractères après SelStart à partir duquel la recherche commence lorsque Options indique une recherche vers l'avant (valeur frDown incluse).

SearchString désigne la chaîne à rechercher dans Buf.

Options détermine si la recherche s'exécute vers l'avant (soDown) ou l'arrière à partir de SelStart ou SelStart+SelLength, si elle tient compte de la casse (soMatchCase) et si la chaîne correspondante doit être un mot entier (soWholeWord).

Si SearchBuf trouve une correspondance, elle renvoie un pointeur sur le premier caractère de la chaîne correspondante dans Buf. Si elle ne trouve aucune correspondance, SearchBuf renvoie nil (Delphi) ou NULL (C++).

Voir aussi