summaryrefslogtreecommitdiff
path: root/tools/streaming_proto/string_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/streaming_proto/string_utils.h')
-rw-r--r--tools/streaming_proto/string_utils.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/streaming_proto/string_utils.h b/tools/streaming_proto/string_utils.h
index d6f195f67188..315b27531afd 100644
--- a/tools/streaming_proto/string_utils.h
+++ b/tools/streaming_proto/string_utils.h
@@ -26,15 +26,20 @@ string make_constant_name(const string& str);
string file_base_name(const string& str);
/**
- * Replace all occurances of 'replace' with 'with'.
+ * Replaces all occurances of 'replace' with 'with'.
*/
string replace_string(const string& str, const char replace, const char with);
/**
- * Split a string to parts by delimiter.
+ * Splits a string to parts by delimiter.
*/
vector<string> split(const string& str, const char delimiter);
+/**
+ * Returns the rest of str if it has prefix, otherwise return all.
+ */
+string stripPrefix(const string& str, const string& prefix);
+
} // namespace stream_proto
} // namespace android