summaryrefslogtreecommitdiffhomepage
path: root/examples/utf8replace_rs.rs
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2022-12-20 23:31:51 +0100
committerTyge Lovset <[email protected]>2022-12-20 23:31:51 +0100
commit5f57d597cd27aef55adbcb3b452973b0c6e33667 (patch)
treedfd59c2fd0e36a6ef37912a9d0cc5a65970f1524 /examples/utf8replace_rs.rs
parent1763be8c8cbbc0896477fcf924edd4180d1345a9 (diff)
downloadSTC-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.rs19
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);
- }
-}