Home
last modified time | relevance | path

Searched refs:length_ (Results 1 – 25 of 119) sorted by relevance

12345

/third_party/protobuf/src/google/protobuf/stubs/
Dstringpiece.cc53 : ptr_(x.ptr_ + pos), length_(x.length_ - pos) { in StringPiece()
55 GOOGLE_DCHECK_LE(pos, x.length_); in StringPiece()
61 : ptr_(x.ptr_ + pos), length_(std::min(len, x.length_ - pos)) { in StringPiece()
63 GOOGLE_DCHECK_LE(pos, x.length_); in StringPiece()
68 target->assign(ptr_, length_); in CopyToString()
72 target->append(ptr_, length_); in AppendToString()
77 ptr_ += x.length_; in Consume()
78 length_ -= x.length_; in Consume()
86 length_ -= x.length_; in ConsumeFromEnd()
95 stringpiece_ssize_type ret = std::min(length_ - pos, n); in copy()
[all …]
Dstringpiece.h182 stringpiece_ssize_type length_; variable
211 StringPiece() : ptr_(nullptr), length_(0) {} in StringPiece()
214 : ptr_(str), length_(0) { in StringPiece()
216 length_ = CheckedSsizeTFromSizeT(strlen(str)); in StringPiece()
223 : ptr_(str.data()), length_(0) { in StringPiece()
224 length_ = CheckedSsizeTFromSizeT(str.size()); in StringPiece()
228 : ptr_(offset), length_(len) { in StringPiece()
247 stringpiece_ssize_type size() const { return length_; } in size()
248 stringpiece_ssize_type length() const { return length_; } in length()
249 bool empty() const { return length_ == 0; } in empty()
[all …]
/third_party/libphonenumber/cpp/src/phonenumbers/base/strings/
Dstring_piece.cc38 size_type ret = std::min(length_ - pos, n); in copy()
44 if (pos > length_) in find()
47 const char* result = std::search(ptr_ + pos, ptr_ + length_, in find()
48 s.ptr_, s.ptr_ + s.length_); in find()
50 return xpos + s.length_ <= length_ ? xpos : npos; in find()
54 if (pos >= length_) in find()
57 const char* result = std::find(ptr_ + pos, ptr_ + length_, c); in find()
58 return result != ptr_ + length_ ? static_cast<size_t>(result - ptr_) : npos; in find()
62 if (length_ < s.length_) in rfind()
66 return std::min(length_, pos); in rfind()
[all …]
Dstring_piece.h49 StringPiece() : ptr_(NULL), length_(0) { } in StringPiece()
51 : ptr_(str), length_((str == NULL) ? 0 : strlen(str)) { } in StringPiece()
53 : ptr_(str.data()), length_(str.size()) { } in StringPiece()
55 : ptr_(offset), length_(len) { } in StringPiece()
62 size_type size() const { return length_; } in size()
63 size_type length() const { return length_; } in length()
64 bool empty() const { return length_ == 0; } in empty()
68 length_ = 0; in clear()
72 length_ = len; in set()
76 length_ = str ? strlen(str) : 0; in set()
[all …]
/third_party/node/deps/v8/src/base/
Dvector.h28 constexpr Vector() : start_(nullptr), length_(0) {} in Vector()
30 constexpr Vector(T* data, size_t length) : start_(data), length_(length) { in Vector()
42 DCHECK_LE(to, length_); in SubVector()
49 DCHECK_GE(std::numeric_limits<int>::max(), length_); in length()
50 return static_cast<int>(length_); in length()
54 constexpr size_t size() const { return length_; } in size()
57 constexpr bool empty() const { return length_ == 0; } in empty()
61 DCHECK_LT(index, length_);
70 DCHECK_LT(0, length_); in last()
71 return start_[length_ - 1]; in last()
[all …]
/third_party/icu/icu4c/source/common/unicode/
Dstringpiece.h63 int32_t length_; variable
70 StringPiece() : ptr_(nullptr), length_(0) { } in StringPiece()
92 StringPiece(std::nullptr_t p) : ptr_(p), length_(0) {} in StringPiece()
99 : ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { } in StringPiece()
107 length_(static_cast<int32_t>(str.size())) { } in StringPiece()
142 length_(static_cast<int32_t>(str.size())) {} in StringPiece()
150 StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } in StringPiece()
195 int32_t size() const { return length_; } in size()
201 int32_t length() const { return length_; } in length()
207 UBool empty() const { return length_ == 0; } in empty()
[all …]
/third_party/node/deps/icu-small/source/common/unicode/
Dstringpiece.h63 int32_t length_; variable
70 StringPiece() : ptr_(nullptr), length_(0) { } in StringPiece()
92 StringPiece(std::nullptr_t p) : ptr_(p), length_(0) {} in StringPiece()
99 : ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { } in StringPiece()
107 length_(static_cast<int32_t>(str.size())) { } in StringPiece()
142 length_(static_cast<int32_t>(str.size())) {} in StringPiece()
150 StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } in StringPiece()
195 int32_t size() const { return length_; } in size()
201 int32_t length() const { return length_; } in length()
207 UBool empty() const { return length_ == 0; } in empty()
[all …]
/third_party/skia/third_party/externals/icu/source/common/unicode/
Dstringpiece.h63 int32_t length_; variable
70 StringPiece() : ptr_(nullptr), length_(0) { } in StringPiece()
92 StringPiece(std::nullptr_t p) : ptr_(p), length_(0) {} in StringPiece()
99 : ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { } in StringPiece()
107 length_(static_cast<int32_t>(str.size())) { } in StringPiece()
142 length_(static_cast<int32_t>(str.size())) {} in StringPiece()
150 StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } in StringPiece()
195 int32_t size() const { return length_; } in size()
201 int32_t length() const { return length_; } in length()
207 UBool empty() const { return length_ == 0; } in empty()
[all …]
/third_party/openh264/test/utils/
DBufferedData.h12 BufferedData() : data_ (NULL), capacity_ (0), length_ (0) {} in BufferedData()
19 if (!EnsureCapacity (length_ + 1)) { in PushBack()
22 data_[length_++] = c; in PushBack()
27 if (!EnsureCapacity (length_ + len)) { in PushBack()
30 memcpy (data_ + length_, data, len); in PushBack()
31 length_ += len; in PushBack()
36 len = std::min (length_, len); in PopFront()
38 memmove (data_, data_ + len, length_ - len); in PopFront()
39 if (-1 == SetLength (length_ - len)) in PopFront()
45 length_ = 0; in Clear()
[all …]
/third_party/node/deps/v8/src/zone/
Dzone-list-inl.h19 if (length_ < capacity_) { in Add()
20 data_[length_++] = element; in Add()
36 int result_length = length_ + length; in AddAll()
39 memcpy(&data_[length_], other.begin(), sizeof(T) * length); in AddAll()
41 std::copy(other.begin(), other.end(), &data_[length_]); in AddAll()
43 length_ = result_length; in AddAll()
55 DCHECK(length_ >= capacity_); in ResizeAddInternal()
63 data_[length_++] = temp; in ResizeAddInternal()
68 DCHECK_LE(length_, new_capacity); in Resize()
70 if (length_ > 0) { in Resize()
[all …]
Dzone-list.h70 length_ = other.length_;
80 DCHECK_GT(static_cast<unsigned>(length_), static_cast<unsigned>(i));
84 inline T& last() const { return at(length_ - 1); } in last()
89 inline iterator end() { return &data_[length_]; } in end()
93 inline const_iterator end() const { return &data_[length_]; } in end()
95 V8_INLINE bool is_empty() const { return length_ == 0; } in is_empty()
96 V8_INLINE int length() const { return length_; } in length()
99 base::Vector<T> ToVector() const { return base::Vector<T>(data_, length_); } in ToVector()
101 DCHECK_LE(start, length_); in ToVector()
102 return base::Vector<T>(&data_[start], std::min(length_ - start, length)); in ToVector()
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/
Dstring_view.cc83 if (empty() || pos > length_) { in find()
88 strings_internal::memmatch(ptr_ + pos, length_ - pos, s.ptr_, s.length_); in find()
93 if (empty() || pos >= length_) { in find()
97 static_cast<const char*>(memchr(ptr_ + pos, c, length_ - pos)); in find()
103 if (length_ < s.length_) return npos; in rfind()
104 if (s.empty()) return std::min(length_, pos); in rfind()
105 const char* last = ptr_ + std::min(length_ - s.length_, pos) + s.length_; in rfind()
106 const char* result = std::find_end(ptr_, last, s.ptr_, s.ptr_ + s.length_); in rfind()
115 for (size_type i = std::min(pos, length_ - 1);; --i) { in rfind()
130 if (s.length_ == 1) return find_first_of(s.ptr_[0], pos); in find_first_of()
[all …]
Dstring_view.h184 constexpr string_view() noexcept : ptr_(nullptr), length_(0) {} in string_view()
203 : ptr_(str), length_(str ? StrlenInternal(str) : 0) {} in string_view()
207 : ptr_(data), length_(CheckLengthInternal(len)) {} in string_view()
226 constexpr const_iterator end() const noexcept { return ptr_ + length_; } in end()
276 constexpr size_type size() const noexcept { return length_; } in size()
291 constexpr bool empty() const noexcept { return length_ == 0; } in empty()
344 ABSL_HARDENING_ASSERT(n <= length_); in remove_prefix()
346 length_ -= n; in remove_prefix()
354 ABSL_HARDENING_ASSERT(n <= length_); in remove_suffix()
355 length_ -= n; in remove_suffix()
[all …]
/third_party/icu/icu4c/source/common/
Dstringpiece.cpp19 : ptr_(str), length_((str == NULL) ? 0 : static_cast<int32_t>(uprv_strlen(str))) { } in StringPiece()
24 } else if (pos > x.length_) { in StringPiece()
25 pos = x.length_; in StringPiece()
28 length_ = x.length_ - pos; in StringPiece()
34 } else if (pos > x.length_) { in StringPiece()
35 pos = x.length_; in StringPiece()
39 } else if (len > x.length_ - pos) { in StringPiece()
40 len = x.length_ - pos; in StringPiece()
43 length_ = len; in StringPiece()
49 length_ = static_cast<int32_t>(uprv_strlen(str)); in set()
[all …]
/third_party/skia/third_party/externals/icu/source/common/
Dstringpiece.cpp19 : ptr_(str), length_((str == NULL) ? 0 : static_cast<int32_t>(uprv_strlen(str))) { } in StringPiece()
24 } else if (pos > x.length_) { in StringPiece()
25 pos = x.length_; in StringPiece()
28 length_ = x.length_ - pos; in StringPiece()
34 } else if (pos > x.length_) { in StringPiece()
35 pos = x.length_; in StringPiece()
39 } else if (len > x.length_ - pos) { in StringPiece()
40 len = x.length_ - pos; in StringPiece()
43 length_ = len; in StringPiece()
49 length_ = static_cast<int32_t>(uprv_strlen(str)); in set()
[all …]
/third_party/node/deps/icu-small/source/common/
Dstringpiece.cpp19 : ptr_(str), length_((str == nullptr) ? 0 : static_cast<int32_t>(uprv_strlen(str))) { } in StringPiece()
24 } else if (pos > x.length_) { in StringPiece()
25 pos = x.length_; in StringPiece()
28 length_ = x.length_ - pos; in StringPiece()
34 } else if (pos > x.length_) { in StringPiece()
35 pos = x.length_; in StringPiece()
39 } else if (len > x.length_ - pos) { in StringPiece()
40 len = x.length_ - pos; in StringPiece()
43 length_ = len; in StringPiece()
49 length_ = static_cast<int32_t>(uprv_strlen(str)); in set()
[all …]
/third_party/node/deps/v8/src/strings/
Dstring-stream.cc27 CHECK_LE(bytes, length_); in allocate()
32 *old = length_; in grow()
38 DCHECK(length_ < capacity_); in Put()
42 if (length_ == capacity_ - 2) { in Put()
51 length_ = capacity_ - 1; // Indicate fullness of the stream. in Put()
52 buffer_[length_ - 4] = '.'; in Put()
53 buffer_[length_ - 3] = '.'; in Put()
54 buffer_[length_ - 2] = '.'; in Put()
55 buffer_[length_ - 1] = '\n'; in Put()
56 buffer_[length_] = '\0'; in Put()
[all …]
/third_party/skia/third_party/externals/sfntly/cpp/src/sfntly/port/
Dmemory_input_stream.cc33 length_(0) { in MemoryInputStream()
41 return length_; in Length()
45 return length_ - position_; in Available()
67 if (position_ >= length_) { in Read()
89 if (position_ >= length_) { in Read()
95 size_t read_count = std::min<size_t>(length_ - position_, length); in Read()
120 skip_count = std::min<size_t>(length_ - position_, (size_t)n); in Skip()
149 length_ = length; in Attach()
Dfile_input_stream.cc31 length_(0) { in FileInputStream()
39 return length_; in Length()
43 return length_ - position_; in Available()
49 length_ = 0; in Close()
101 size_t read_count = std::min<size_t>(length_ - position_, length); in Read()
127 skip_count = std::min<size_t>(length_ - position_, (size_t)n); in Skip()
170 length_ = ftell(file_); in Open()
/third_party/node/deps/v8/src/snapshot/
Dsnapshot-source-sink.h30 length_(length), in SnapshotByteSource()
34 : data_(payload.begin()), length_(payload.length()), position_(0) {} in SnapshotByteSource()
40 bool HasMore() { return position_ < length_; } in HasMore()
43 DCHECK(position_ < length_); in Get()
48 DCHECK(position_ < length_); in Peek()
86 DCHECK(position_ + 3 < length_); in GetInt()
108 int length_; variable
/third_party/skia/third_party/externals/sfntly/cpp/src/sfntly/table/bitmap/
Dbitmap_glyph_info.cc30 length_(length), in BitmapGlyphInfo()
42 length_(length), in BitmapGlyphInfo()
49 length_ == rhs.length_ && in operator ==()
59 length_ == rhs->length() && in operator ==()
/third_party/skia/third_party/externals/harfbuzz/src/
Dhb-array.hh60 constexpr hb_array_t (Type *array_, unsigned int length_) : arrayZ (array_), length (length_) {} in hb_array_t()
61 template <unsigned int length_>
62 constexpr hb_array_t (Type (&array_)[length_]) : hb_array_t (array_, length_) {} in hb_array_t()
297 template <typename T, unsigned int length_> inline hb_array_t<T>
298 hb_array (T (&array_)[length_]) in hb_array() argument
318 …nstexpr hb_sorted_array_t (Type *array_, unsigned int length_) : hb_array_t<Type> (array_, length_ in hb_sorted_array_t()
319 template <unsigned int length_>
320 constexpr hb_sorted_array_t (Type (&array_)[length_]) : hb_array_t<Type> (array_) {} in hb_sorted_array_t()
401 template <typename T, unsigned int length_> inline hb_sorted_array_t<T>
402 hb_sorted_array (T (&array_)[length_]) in hb_sorted_array() argument
/third_party/skia/third_party/externals/icu/source/i18n/
Ddouble-conversion-utils.h218 Vector() : start_(NULL), length_(0) {} in Vector()
219 Vector(T* data, int len) : start_(data), length_(len) { in Vector()
226 DOUBLE_CONVERSION_ASSERT(to <= length_); in SubVector()
233 int length() const { return length_; } in length()
236 bool is_empty() const { return length_ == 0; } in is_empty()
243 DOUBLE_CONVERSION_ASSERT(0 <= index && index < length_);
249 T& last() { return start_[length_ - 1]; } in last()
253 --length_; in pop_back()
258 int length_; variable
/third_party/node/deps/v8/src/bigint/
Dmul-fft.cc433 : n_(n), K_(K), length_(K + 1), processor_(processor) { in FFTContainer()
434 storage_ = new digit_t[length_ * n_]; in FFTContainer()
437 for (int i = 0; i < n; i++, ptr += length_) { in FFTContainer()
440 temp_ = new digit_t[length_ * 2]; in FFTContainer()
469 int length() const { return length_; } in length()
474 const int length_; // Length of each part, in digits. member in v8::bigint::__anonef5d3e820111::FFTContainer
494 const size_t part_length_in_bytes = length_ * sizeof(digit_t); in Start_Default()
506 DCHECK(length_ >= chunk_size + 1); in Start_Default()
536 const size_t part_length_in_bytes = length_ * sizeof(digit_t); in Start()
568 length_); in FFT_ReturnShuffledThreadsafe()
[all …]
/third_party/icu/icu4c/source/i18n/
Ddouble-conversion-utils.h264 Vector() : start_(DOUBLE_CONVERSION_NULLPTR), length_(0) {} in Vector()
265 Vector(T* data, int len) : start_(data), length_(len) { in Vector()
272 DOUBLE_CONVERSION_ASSERT(to <= length_); in SubVector()
279 int length() const { return length_; } in length()
282 bool is_empty() const { return length_ == 0; } in is_empty()
289 DOUBLE_CONVERSION_ASSERT(0 <= index && index < length_);
295 T& last() { return start_[length_ - 1]; } in last()
299 --length_; in pop_back()
304 int length_; variable

12345