diff options
author | Lei Zhang <thestig@chromium.org> | 2017-11-21 18:07:00 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-21 18:07:00 +0000 |
commit | 135c6601bd9d12bd935371d3122f8e75391de75b (patch) | |
tree | 185227ece2aa6cceb58911d2b25871dab4860251 /core/fxcrt/bytestring.h | |
parent | f276e78e190e04b25c3f05b35a28ecdd30bdcf21 (diff) | |
download | pdfium-135c6601bd9d12bd935371d3122f8e75391de75b.tar.xz |
Add {Byte/Wide}String::Trim().
So callers no longer have to call str.TrimLeft(); str.TrimRight();
Change-Id: If931eaa8d891f487b9618ebbeee5ee294e807846
Reviewed-on: https://pdfium-review.googlesource.com/18990
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/bytestring.h')
-rw-r--r-- | core/fxcrt/bytestring.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core/fxcrt/bytestring.h b/core/fxcrt/bytestring.h index 1acece3aee..bd414fc76f 100644 --- a/core/fxcrt/bytestring.h +++ b/core/fxcrt/bytestring.h @@ -167,13 +167,17 @@ class ByteString { void MakeLower(); void MakeUpper(); - void TrimRight(); - void TrimRight(char chTarget); - void TrimRight(const ByteStringView& lpszTargets); + void Trim(); + void Trim(char target); + void Trim(const ByteStringView& targets); void TrimLeft(); - void TrimLeft(char chTarget); - void TrimLeft(const ByteStringView& lpszTargets); + void TrimLeft(char target); + void TrimLeft(const ByteStringView& targets); + + void TrimRight(); + void TrimRight(char target); + void TrimRight(const ByteStringView& targets); size_t Replace(const ByteStringView& lpszOld, const ByteStringView& lpszNew); |