Commit 55f18449 authored by zhujiashun's avatar zhujiashun

support_kv_pair_splitter: refine code

parent b9447657
...@@ -199,11 +199,11 @@ public: ...@@ -199,11 +199,11 @@ public:
key_value_delimiter, key_value_pair_delimiter) {} key_value_delimiter, key_value_pair_delimiter) {}
inline StringPiece key() { inline StringPiece key() {
return StringPiece(_sp.field(), _sp.length()).substr(0, _deli_pos); return key_and_value().substr(0, _deli_pos);
} }
inline StringPiece value() { inline StringPiece value() {
return StringPiece(_sp.field(), _sp.length()).substr(_deli_pos + 1); return key_and_value().substr(_deli_pos + 1);
} }
// Get the current value of key and value // Get the current value of key and value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment