OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Lars Knoll <lars@trolltech.com> | 2 * Copyright (C) 2006 Lars Knoll <lars@trolltech.com> |
3 * Copyright (C) 2007, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2011, 2012 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 unsigned m_length; | 248 unsigned m_length; |
249 | 249 |
250 // For 16 bit strings, we use a TextBreakIterator. | 250 // For 16 bit strings, we use a TextBreakIterator. |
251 TextBreakIterator* m_iterator; | 251 TextBreakIterator* m_iterator; |
252 }; | 252 }; |
253 | 253 |
254 // Counts the number of grapheme clusters. A surrogate pair or a sequence | 254 // Counts the number of grapheme clusters. A surrogate pair or a sequence |
255 // of a non-combining character and following combining characters is | 255 // of a non-combining character and following combining characters is |
256 // counted as 1 grapheme cluster. | 256 // counted as 1 grapheme cluster. |
257 PLATFORM_EXPORT unsigned numGraphemeClusters(const String&); | 257 PLATFORM_EXPORT unsigned numGraphemeClusters(const String&); |
| 258 // Returns the number of characters which will be less than or equal to |
| 259 // the specified grapheme cluster length. |
| 260 PLATFORM_EXPORT unsigned numCharactersInGraphemeClusters(const String&, unsigned
); |
258 | 261 |
259 } | 262 } |
260 | 263 |
261 #endif | 264 #endif |
OLD | NEW |