Return a copy of str with leading and trailing pattern characters removed.
Declared in <util/string.h>
[[nodiscard]]
std::string
TrimString(
std::string_view str,
std::string_view pattern = " \f\n\r\t\v");
A new string without the leading and trailing pattern characters.
The return value should not be discarded.
| Name | Description |
|---|---|
| str | Input string. |
| pattern | Characters trimmed from both ends. |