Lines Matching refs:ptr_
41 const char* ptr_;
48 StringPiece() : ptr_(NULL), length_(0) { } in StringPiece()
50 : ptr_(str), length_((str == NULL) ? 0 : static_cast<int>(strlen(str))) { } in StringPiece()
52 : ptr_(str.data()), length_(static_cast<int>(str.size())) { } in StringPiece()
53 StringPiece(const char* offset, int len) : ptr_(offset), length_(len) { } in StringPiece()
59 const char* data() const { return ptr_; } in data()
65 ptr_ = NULL; in clear()
69 ptr_ = data; in set()
73 ptr_ = str; in set()
80 ptr_ = reinterpret_cast<const char*>(data); in set()
84 char operator[](int i) const { return ptr_[i]; }
87 ptr_ += n; in remove_prefix()
115 (memcmp(ptr_, x.ptr_, x.length_) == 0)); in starts_with()
121 (memcmp(ptr_ + (length_-x.length_), x.ptr_, x.length_) == 0)); in ends_with()
136 iterator begin() const { return ptr_; } in begin()
137 iterator end() const { return ptr_ + length_; } in end()
139 return const_reverse_iterator(ptr_ + length_); in rbegin()
142 return const_reverse_iterator(ptr_); in rend()