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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy