[#absl-ConsumeSuffix] = xref:absl.adoc[absl]::ConsumeSuffix :relfileprefix: ../ :mrdocs: Strips the `expected` suffix, if found, from the end of `str`. If the operation succeeded, `true` is returned. If not, `false` is returned and `str` is not modified. == Synopsis Declared in `<absl/strings/strip.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr bool ConsumeSuffix( std::string_view* str, std::string_view expected); ---- == Description Example: absl::string_view input("abcdef"); EXPECT_TRUE(absl::ConsumeSuffix(&input, "def")); EXPECT_EQ(input, "abc"); == Return Value `true` if the suffix was found and removed, `false` otherwise. == Parameters [cols="1,4"] |=== | Name| Description | *str* | The string to strip the suffix from in place. | *expected* | The suffix to remove. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#