Index: src/string-stream.cc |
diff --git a/src/string-stream.cc b/src/string-stream.cc |
index ebe1b5b43b58901f28b710c0e1c92def905e8b8e..89815aacfa3e020b730f5e67896f173692f28ebe 100644 |
--- a/src/string-stream.cc |
+++ b/src/string-stream.cc |
@@ -81,6 +81,13 @@ bool StringStream::Put(char c) { |
} |
+void StringStream::Remove(unsigned num_of_chars) { |
+ unsigned to_remove = num_of_chars*2; |
+ to_remove = (to_remove>length_) ? length_ : num_of_chars; |
+ length_ -= to_remove; |
+} |
+ |
+ |
// A control character is one that configures a format element. For |
// instance, in %.5s, .5 are control characters. |
static bool IsControlChar(char c) { |