diff options
author | Steven Laver <lavers@google.com> | 2019-12-12 15:29:36 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-12-12 15:29:36 +0000 |
commit | a239544c7b06814b70fd970de7eaac234682fa52 (patch) | |
tree | a4298d61f9b73642f350799b1157e49b65f4e1e8 /base/include/android-base/strings.h | |
parent | 63de1e1c8d7824c241f22de67edf54f4f1eaeea5 (diff) | |
parent | 5319412e5305a3b4bcecf251a2955c09a6e9837e (diff) |
Merge "Merge RP1A.191203.001" into r-keystone-qcom-dev
Diffstat (limited to 'base/include/android-base/strings.h')
-rw-r--r-- | base/include/android-base/strings.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/include/android-base/strings.h b/base/include/android-base/strings.h index b1c22c9f7..14d534a3b 100644 --- a/base/include/android-base/strings.h +++ b/base/include/android-base/strings.h @@ -85,5 +85,10 @@ inline bool ConsumeSuffix(std::string_view* s, std::string_view suffix) { return true; } +// Replaces `from` with `to` in `s`, once if `all == false`, or as many times as +// there are matches if `all == true`. +[[nodiscard]] std::string StringReplace(std::string_view s, std::string_view from, + std::string_view to, bool all); + } // namespace base } // namespace android |