Lines Matching defs:pos
21 StringPiece::StringPiece(const StringPiece& x, int32_t pos) {
22 if (pos < 0) {
23 pos = 0;
24 } else if (pos > x.length_) {
25 pos = x.length_;
27 ptr_ = x.ptr_ + pos;
28 length_ = x.length_ - pos;
31 StringPiece::StringPiece(const StringPiece& x, int32_t pos, int32_t len) {
32 if (pos < 0) {
33 pos = 0;
34 } else if (pos > x.length_) {
35 pos = x.length_;
39 } else if (len > x.length_ - pos) {
40 len = x.length_ - pos;
42 ptr_ = x.ptr_ + pos;