8000 Update Graphemes Example · YohDeadfall/unicode-segmentation@d6e0d88 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6e0d88

Browse files
authored
Update Graphemes Example
Update the Graphemes example to use method syntax to be more coherent with the rest of the example.
1 parent f835b6a commit d6e0d88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use unicode_segmentation::UnicodeSegmentation;
1010

1111
fn main() {
1212
let s = "a̐éö̲\r\n";
13-
let g = UnicodeSegmentation::graphemes(s, true).collect::<Vec<&str>>();
13+
let g = s.graphemes(true).collect::<Vec<&str>>();
1414
let b: &[_] = &["", "", "ö̲", "\r\n"];
1515
assert_eq!(g, b);
1616

0 commit comments

Comments
 (0)
0