diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-07-27 18:30:33 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-07-27 20:49:29 +0300 |
commit | 7e91a60be6d1ced76d0aeef2665c9792af282e0e (patch) | |
tree | 846cb1afbdd99a8e2aa2420ac0e7d50e1b013425 /build_files | |
parent | c6ba7359ae89dc4405c35972ecea7850f55dd83f (diff) |
Add `StringRef::trim()` functions
Add three functions that trim characters from the front & end of a
`StringRef`. All functions return a new `StringRef` that references a
sub-string of the original `StringRef`.
- `trim(chars_to_remove)`: strips all characters from the start and end
that occur in `chars_to_remove`.
- `trim(char_to_remove)`: same, but with a single character to remove.
- `trim()`: remove leading & trailing whitespace, so same as
`trim(" \r\n\t")`
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D12031
Diffstat (limited to 'build_files')
0 files changed, 0 insertions, 0 deletions