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 squence de caractres ou un seul caractre comparer la fin de la chane de caractres |
Valeur de retour
true si la chane de caractres finit par le suffixe donn, false sinon.
Exemple
| This section is incomplete Reason: no example |
Voir aussi
(C++20) |
vrifie si la chane de caractres commence par le prfixe donn (fonction membre publique) |
(C++20) |
vrifie si la vue sur chane de caractres commence par le prfixe donn (fonction membre publique de std::basic_string_view)
|
(C++20) |
vrifie si la vue sur chane de caractres finit par le suffixe donn (fonction membre publique de std::basic_string_view)
|
compare deux chanes 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-chane 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) | |