diff options
author | Casey Dahlin <sadmac@google.com> | 2015-10-30 18:54:38 -0700 |
---|---|---|
committer | Casey Dahlin <sadmac@google.com> | 2015-11-02 11:04:34 -0800 |
commit | 5345f1df0d83ec08cf156584d32d425ee9f941e5 (patch) | |
tree | a2d961ab8cb5884aab9726def625fd6ce5acb2c0 /base/strings.cpp | |
parent | 24704399cdd58a396831fce2ba678642bd3a8ba5 (diff) | |
download | system_core-5345f1df0d83ec08cf156584d32d425ee9f941e5.tar.gz system_core-5345f1df0d83ec08cf156584d32d425ee9f941e5.tar.bz2 system_core-5345f1df0d83ec08cf156584d32d425ee9f941e5.zip |
Make Join support string delimiters
We've needed this several times in the past.
Change-Id: I7324e8083fe2ff1aa0bf392a8c124fc2f3bb26e2
Test: Full android build
Signed-off-by: Casey Dahlin <sadmac@google.com>
Diffstat (limited to 'base/strings.cpp')
-rw-r--r-- | base/strings.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/base/strings.cpp b/base/strings.cpp index bac983b01..d687e3cf6 100644 --- a/base/strings.cpp +++ b/base/strings.cpp @@ -83,6 +83,8 @@ std::string Trim(const std::string& s) { // aid compile time and binary size. template std::string Join(const std::vector<std::string>&, char); template std::string Join(const std::vector<const char*>&, char); +template std::string Join(const std::vector<std::string>&, const std::string&); +template std::string Join(const std::vector<const char*>&, const std::string&); bool StartsWith(const std::string& s, const char* prefix) { return s.compare(0, strlen(prefix), prefix) == 0; |