cpp/string/basic string/find : Différence entre versions
De cppreference.com
< cpp | string | basic string
(Translated from the English version using Google Translate) |
m (Use {{lc}}. Update links. Various fixes.) |
||
(2 révisions intermédiaires par 2 utilisateurs sont masquées) | |||
Ligne 2 : | Ligne 2 : | ||
{{cpp/string/basic_string/title | find}} | {{cpp/string/basic_string/title | find}} | ||
{{cpp/string/basic_string/navbar}} | {{cpp/string/basic_string/navbar}} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| num=1 | 1= |
size_type find( const basic_string& str, size_type pos = 0 ) const; | size_type find( const basic_string& str, size_type pos = 0 ) const; | ||
}} | }} | ||
− | {{ | + | {{| num=2 | 1= |
size_type find( const CharT* s, size_type pos, size_type count ) const; | size_type find( const CharT* s, size_type pos, size_type count ) const; | ||
}} | }} | ||
− | {{ | + | {{| num=3 | 1= |
size_type find( const CharT* s, size_type pos = 0 ) const; | size_type find( const CharT* s, size_type pos = 0 ) const; | ||
}} | }} | ||
− | {{ | + | {{| num=4 | 1= |
size_type find( CharT ch, size_type pos = 0 ) const; | size_type find( CharT ch, size_type pos = 0 ) const; | ||
}} | }} | ||
− | {{ | + | {{end}} |
{{tr|Trouve la première chaîne égale à la séquence de caractères donnée. La recherche commence à {{tt|pos}}, à savoir la sous-chaîne trouvée ne doit pas commencer dans une position précédant {{tt|pos}} .|Finds the first substring equal to the given character sequence. Search begins at {{tt|pos}}, i.e. the found substring must not begin in a position preceding {{tt|pos}}.}} | {{tr|Trouve la première chaîne égale à la séquence de caractères donnée. La recherche commence à {{tt|pos}}, à savoir la sous-chaîne trouvée ne doit pas commencer dans une position précédant {{tt|pos}} .|Finds the first substring equal to the given character sequence. Search begins at {{tt|pos}}, i.e. the found substring must not begin in a position preceding {{tt|pos}}.}} | ||
Ligne 28 : | Ligne 28 : | ||
===Paramètres=== | ===Paramètres=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| str |{{tr| chaîne à rechercher| string to search for}}}} |
− | {{ | + | {{| count |{{tr| longueur de chaîne à rechercher| length of substring to search for}}}} |
− | {{ | + | {{| s |{{tr| pointeur vers une chaîne de caractères pour seach| pointer to a character string to seach for}}}} |
− | {{ | + | {{| ch |{{tr| de caractères à rechercher| character to search for}}}} |
− | {{ | + | {{end}} |
===Retourne la valeur=== | ===Retourne la valeur=== | ||
Ligne 82 : | Ligne 82 : | ||
===Voir aussi=== | ===Voir aussi=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| cpp/string/basic_string/rfind}} |
− | {{ | + | {{| cpp/string/basic_string/find_first_of}} |
− | {{ | + | {{| cpp/string/basic_string/find_first_not_of}} |
− | {{ | + | {{| cpp/string/basic_string/find_last_of}} |
− | {{ | + | {{| cpp/string/basic_string/find_last_not_of}} |
− | {{ | + | {{end}} |
[[de:cpp/string/basic string/find]] | [[de:cpp/string/basic string/find]] | ||
+ | |||
+ | |||
+ | |||
[[ja:cpp/string/basic string/find]] | [[ja:cpp/string/basic string/find]] | ||
[[pt:cpp/string/basic string/find]] | [[pt:cpp/string/basic string/find]] | ||
[[ru:cpp/string/basic string/find]] | [[ru:cpp/string/basic string/find]] | ||
[[zh:cpp/string/basic string/find]] | [[zh:cpp/string/basic string/find]] |
Version actuelle en date du 2 juillet 2013 à 05:46
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
size_type find( const basic_string& str, size_type pos = 0 ) const; |
(1) | |
size_type find( const CharT* s, size_type pos, size_type count ) const; |
(2) | |
size_type find( const CharT* s, size_type pos = 0 ) const; |
(3) | |
size_type find( CharT ch, size_type pos = 0 ) const; |
(4) | |
Trouve la première chaîne égale à la séquence de caractères donnée. La recherche commence à
1) pos
, à savoir la sous-chaîne trouvée ne doit pas commencer dans une position précédant pos
.Original:
Finds the first substring equal to the given character sequence. Search begins at
pos
, i.e. the found substring must not begin in a position preceding pos
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Trouve la première chaîne égale à
2) str
. Original:
Finds the first substring equal to
str
. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Trouve la première chaîne à la hauteur des caractères
3) count
premiers de la chaîne de caractères pointée par s
. s
peuvent inclure des caractères nuls .Original:
Finds the first substring equal to the first
count
characters of the character string pointed to by s
. s
can include null characters.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Trouve la première chaîne égale à la chaîne de caractères pointée par
4) s
. La longueur de la chaîne est déterminée par le premier caractère null .Original:
Finds the first substring equal to the character string pointed to by
s
. The length of the string is determined by the first null character.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Trouve le premier caractère
ch
.Original:
Finds the first character
ch
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Sommaire |