aboutsummaryrefslogtreecommitdiff
path: root/strutil.cc
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-05 14:33:02 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-05 14:33:02 +0900
commit415a9b1b3aa75238c9893ea5f117c0877ecc8329 (patch)
tree6d886f3e746d844a0824ee07e03c436e07e4e8b9 /strutil.cc
parent631a9f83ffa25074612d53c8b32c771401264f2d (diff)
[C++] Fix err_semicolon_in_output.mk
Diffstat (limited to 'strutil.cc')
-rw-r--r--strutil.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/strutil.cc b/strutil.cc
index 5393ed2..97673a7 100644
--- a/strutil.cc
+++ b/strutil.cc
@@ -345,6 +345,12 @@ size_t FindTwoOutsideParen(StringPiece s, char c1, char c2) {
});
}
+size_t FindThreeOutsideParen(StringPiece s, char c1, char c2, char c3) {
+ return FindOutsideParenImpl(s, [&c1, &c2, &c3](char d){
+ return d == c1 || d == c2 || d == c3;
+ });
+}
+
size_t FindEndOfLine(StringPiece s, size_t e, size_t* lf_cnt) {
bool prev_backslash = false;
for (; e < s.size(); e++) {