aboutsummaryrefslogtreecommitdiff
path: root/strutil.cc
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-06-17 18:18:34 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-06-18 11:25:45 +0900
commitd87e59e27d65e7c3c00425f36bbaf7c91e81c6e7 (patch)
tree74452d9c80b8c53a616118b815cac8088ccfcd38 /strutil.cc
parent00cc658846e0a980a1a6cfa25c3fda3662b4b912 (diff)
[C++] Implement sort
Diffstat (limited to 'strutil.cc')
-rw-r--r--strutil.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/strutil.cc b/strutil.cc
index 1c9805d..aced7ff 100644
--- a/strutil.cc
+++ b/strutil.cc
@@ -50,6 +50,11 @@ WordScanner::Iterator WordScanner::end() const {
return iter;
}
+void WordScanner::Split(vector<StringPiece>* o) {
+ for (StringPiece t : *this)
+ o->push_back(t);
+}
+
WordWriter::WordWriter(string* o)
: out_(o),
needs_space_(false) {