| 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 #ifndef BASE_I18N_BREAK_ITERATOR_H_ | 5 #ifndef BASE_I18N_BREAK_ITERATOR_H_ |
| 6 #define BASE_I18N_BREAK_ITERATOR_H_ | 6 #define BASE_I18N_BREAK_ITERATOR_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/string16.h" | |
| 10 #include "base/i18n/base_i18n_export.h" | 9 #include "base/i18n/base_i18n_export.h" |
| 10 #include "base/strings/string16.h" |
| 11 | 11 |
| 12 // The BreakIterator class iterates through the words, word breaks, and | 12 // The BreakIterator class iterates through the words, word breaks, and |
| 13 // line breaks in a UTF-16 string. | 13 // line breaks in a UTF-16 string. |
| 14 // | 14 // |
| 15 // It provides several modes, BREAK_WORD, BREAK_LINE, and BREAK_NEWLINE, | 15 // It provides several modes, BREAK_WORD, BREAK_LINE, and BREAK_NEWLINE, |
| 16 // which modify how characters are aggregated into the returned string. | 16 // which modify how characters are aggregated into the returned string. |
| 17 // | 17 // |
| 18 // Under BREAK_WORD mode, once a word is encountered any non-word | 18 // Under BREAK_WORD mode, once a word is encountered any non-word |
| 19 // characters are not included in the returned string (e.g. in the | 19 // characters are not included in the returned string (e.g. in the |
| 20 // UTF-16 equivalent of the string " foo bar! ", the word breaks are at | 20 // UTF-16 equivalent of the string " foo bar! ", the word breaks are at |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Previous and current iterator positions. | 122 // Previous and current iterator positions. |
| 123 size_t prev_, pos_; | 123 size_t prev_, pos_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(BreakIterator); | 125 DISALLOW_COPY_AND_ASSIGN(BreakIterator); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 } // namespace i18n | 128 } // namespace i18n |
| 129 } // namespace base | 129 } // namespace base |
| 130 | 130 |
| 131 #endif // BASE_I18N_BREAK_ITERATOR_H_ | 131 #endif // BASE_I18N_BREAK_ITERATOR_H_ |
| OLD | NEW |