OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/i18n/break_iterator.h" | 5 #include "base/i18n/break_iterator.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "third_party/icu/source/common/unicode/ubrk.h" | 10 #include "third_party/icu/source/common/unicode/ubrk.h" |
9 #include "third_party/icu/source/common/unicode/uchar.h" | 11 #include "third_party/icu/source/common/unicode/uchar.h" |
10 #include "third_party/icu/source/common/unicode/ustring.h" | 12 #include "third_party/icu/source/common/unicode/ustring.h" |
11 | 13 |
12 namespace base { | 14 namespace base { |
13 namespace i18n { | 15 namespace i18n { |
14 | 16 |
15 const size_t npos = static_cast<size_t>(-1); | 17 const size_t npos = static_cast<size_t>(-1); |
16 | 18 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 return GetStringPiece().as_string(); | 183 return GetStringPiece().as_string(); |
182 } | 184 } |
183 | 185 |
184 StringPiece16 BreakIterator::GetStringPiece() const { | 186 StringPiece16 BreakIterator::GetStringPiece() const { |
185 DCHECK(prev_ != npos && pos_ != npos); | 187 DCHECK(prev_ != npos && pos_ != npos); |
186 return string_.substr(prev_, pos_ - prev_); | 188 return string_.substr(prev_, pos_ - prev_); |
187 } | 189 } |
188 | 190 |
189 } // namespace i18n | 191 } // namespace i18n |
190 } // namespace base | 192 } // namespace base |
OLD | NEW |