std::basic_string::ends_with
De cppreference.com
<tbody>
</tbody>
bool ends_with(std::basic_string_view<CharT, Traits> x) const noexcept; |
(1) | |
bool ends_with(CharT x) const noexcept; |
(2) | |
bool ends_with(const CharT* x) const; |
(3) | |
Checks if the string ends with the given suffix, where
1) the suffix is a string view (which may be a result of implicit conversion from another
std::basic_string)2) the suffix is a single character
3) the suffix is a C-style string
All three overloads effectively return std::basic_string_view<CharT, Traits>(data(), size()).ends_with(x);
Parameters
| x | - | une séquence de caractères ou un seul caractère à comparer à la fin de la chaîne de caractères |
Valeur de retour
true si la chaîne de caractères finit par le suffixe donné, false sinon.
Exemple
| This section is incomplete Reason: no example |
Voir aussi
(C++20) |
vérifie si la chaîne de caractères commence par le préfixe donné (fonction membre publique) |
(C++20) |
vérifie si la vue sur chaîne de caractères commence par le préfixe donné (fonction membre publique de std::basic_string_view)
|
(C++20) |
vérifie si la vue sur chaîne de caractères finit par le suffixe donné (fonction membre publique de std::basic_string_view)
|
compare deux chaînes Original: compares two strings The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) | |
renvoie une sous-chaîne Original: returns a substring The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) | |