diff options
| author | Tyge Lovset <[email protected]> | 2022-12-20 23:31:51 +0100 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2022-12-20 23:31:51 +0100 |
| commit | 5f57d597cd27aef55adbcb3b452973b0c6e33667 (patch) | |
| tree | dfd59c2fd0e36a6ef37912a9d0cc5a65970f1524 /examples/utf8replace_rs.rs | |
| parent | 1763be8c8cbbc0896477fcf924edd4180d1345a9 (diff) | |
| download | STC-modified-5f57d597cd27aef55adbcb3b452973b0c6e33667.tar.gz STC-modified-5f57d597cd27aef55adbcb3b452973b0c6e33667.zip | |
Restructured folders: examples, benchmarks, tests into misc folder.
Diffstat (limited to 'examples/utf8replace_rs.rs')
| -rw-r--r-- | examples/utf8replace_rs.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/examples/utf8replace_rs.rs b/examples/utf8replace_rs.rs deleted file mode 100644 index 717978aa..00000000 --- a/examples/utf8replace_rs.rs +++ /dev/null @@ -1,19 +0,0 @@ - -pub fn main() { - let mut hello = String::from("hell😀 world"); - println!("{}", hello); - - hello.replace_range( - hello - .char_indices() - .nth(4) - .map(|(pos, ch)| (pos..pos + ch.len_utf8())) - .unwrap(), - "🐨", - ); - println!("{}", hello); - - for c in hello.chars() { - print!("{},", c); - } -} |
