OLD | NEW |
1 // | 1 // |
2 // Copyright 2014 Google Inc. All rights reserved. | 2 // Copyright 2014 Google Inc. All rights reserved. |
3 // | 3 // |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file or at | 5 // license that can be found in the LICENSE file or at |
6 // https://developers.google.com/open-source/licenses/bsd | 6 // https://developers.google.com/open-source/licenses/bsd |
7 // | 7 // |
8 | 8 |
9 library charted.core.text_metrics.segmentation; | 9 library charted.core.text_metrics.segmentation; |
10 | 10 |
(...skipping 48 matching lines...) Loading... |
59 int previousType = 0; | 59 int previousType = 0; |
60 for (var iter = s.runes.iterator; iter.moveNext();) { | 60 for (var iter = s.runes.iterator; iter.moveNext();) { |
61 int currentType = _typeForRune(iter.current); | 61 int currentType = _typeForRune(iter.current); |
62 if (GRAPHEME_BREAK_TABLE[previousType * 12 + currentType] == 1) { | 62 if (GRAPHEME_BREAK_TABLE[previousType * 12 + currentType] == 1) { |
63 indices.add(iter.rawIndex); | 63 indices.add(iter.rawIndex); |
64 } | 64 } |
65 previousType = currentType; | 65 previousType = currentType; |
66 } | 66 } |
67 return indices; | 67 return indices; |
68 } | 68 } |
OLD | NEW |