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/widestring.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/widestring.h')
-rw-r--r-- | core/fxcrt/widestring.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core/fxcrt/widestring.h b/core/fxcrt/widestring.h index 9d856c72c9..f48c32379a 100644 --- a/core/fxcrt/widestring.h +++ b/core/fxcrt/widestring.h @@ -147,13 +147,17 @@ class WideString { void MakeLower(); void MakeUpper(); - void TrimRight(); - void TrimRight(wchar_t chTarget); - void TrimRight(const WideStringView& pTargets); + void Trim(); + void Trim(wchar_t target); + void Trim(const WideStringView& targets); void TrimLeft(); - void TrimLeft(wchar_t chTarget); - void TrimLeft(const WideStringView& pTargets); + void TrimLeft(wchar_t target); + void TrimLeft(const WideStringView& targets); + + void TrimRight(); + void TrimRight(wchar_t target); + void TrimRight(const WideStringView& targets); void Reserve(size_t len); wchar_t* GetBuffer(size_t len); |