summaryrefslogtreecommitdiffstats
path: root/src/string_piece.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_piece.h')
-rw-r--r--src/string_piece.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string_piece.h b/src/string_piece.h
index ad1153e..76679f1 100644
--- a/src/string_piece.h
+++ b/src/string_piece.h
@@ -46,6 +46,10 @@ struct StringPiece {
return len_ ? string(str_, len_) : string();
}
+ const char* str() const { return str_; }
+ int len() const { return len_; }
+
+ private:
const char* str_;
int len_;
};