Lines Matching refs:pos
19 StringPiece::StringPiece(const StringPiece& x, int32_t pos) {
20 if (pos < 0) {
21 pos = 0;
22 } else if (pos > x.length_) {
23 pos = x.length_;
25 ptr_ = x.ptr_ + pos;
26 length_ = x.length_ - pos;
29 StringPiece::StringPiece(const StringPiece& x, int32_t pos, int32_t len) {
30 if (pos < 0) {
31 pos = 0;
32 } else if (pos > x.length_) {
33 pos = x.length_;
37 } else if (len > x.length_ - pos) {
38 len = x.length_ - pos;
40 ptr_ = x.ptr_ + pos;