Specify characters to trim.
Declared in <folly/String.h>
template<typename ToTrim>
StringPiece
trim(
StringPiece sp,
ToTrim toTrim);
Returns a subpiece with all characters the provided toTrim returns true for removed from the back and front of sp.
A subpiece with the matching leading and trailing characters removed.
| Name | Description |
|---|---|
| sp | The input piece to trim. |
| toTrim | Predicate selecting characters to remove. |