Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Side by Side Diff: packages/charted/lib/core/text_metrics/segmentation.dart

Issue 2213693002: Updated charted DEP to 0.4.X (Closed) Base URL: https://github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « packages/charted/lib/core/scales/time_scale.dart ('k') | packages/charted/lib/core/timer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 if (CODE_POINT_BLOCKS[idx] > rune) { 179 if (CODE_POINT_BLOCKS[idx] > rune) {
180 max = mid - 1; 180 max = mid - 1;
181 } else if (CODE_POINT_BLOCKS[idx + 1] < rune) { 181 } else if (CODE_POINT_BLOCKS[idx + 1] < rune) {
182 min = max + 1; 182 min = max + 1;
183 } 183 }
184 } 184 }
185 return CODE_CATEGORY_OTHER; // Defaults to OTHER. 185 return CODE_CATEGORY_OTHER; // Defaults to OTHER.
186 } 186 }
187 187
188 Iterable<int> graphemeBreakIndices(String s) { 188 List<int> graphemeBreakIndices(String s) {
189 List<int> indices = []; 189 List<int> indices = [];
190 int previousType = 0; 190 int previousType = 0;
191 for (var iter = s.runes.iterator; iter.moveNext();) { 191 for (var iter = s.runes.iterator; iter.moveNext();) {
192 int currentType = _typeForRune(iter.current); 192 int currentType = _typeForRune(iter.current);
193 if (GRAPHEME_BREAK_TABLE[previousType * 12 + currentType] == 1) { 193 if (GRAPHEME_BREAK_TABLE[previousType * 12 + currentType] == 1) {
194 indices.add(iter.rawIndex); 194 indices.add(iter.rawIndex);
195 } 195 }
196 previousType = currentType; 196 previousType = currentType;
197 } 197 }
198 return indices; 198 return indices;
199 } 199 }
OLDNEW
« no previous file with comments | « packages/charted/lib/core/scales/time_scale.dart ('k') | packages/charted/lib/core/timer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698