History of Idiom 38 > diff from v21 to v22
Edit summary for version 22 by :
↷
Version 21
2015-09-06, 16:15:06
Version 22
2015-09-28, 20:49:34
Idiom #38 Extract a substring
Find substring t consisting in characters i (included) to j (excluded) of string s.
(character indexes start at 0 unless specified otherwise)
Idiom #38 Extract a substring
Find substring t consisting in characters i (included) to j (excluded) of string s.
(character indexes start at 0 unless specified otherwise)
Demo URL
https://play.rust-lang.org/?code=fn%20main()%20%7B%0A%20%20%20%20let%20s%20%3D%20%22Lorem%20Ipsum%20Dolor%22%3B%0A%20%20%20%20let%20(i%2C%20j)%20%3D%20(6%2C%2011)%3B%0A%20%20%20%20let%20t%20%3D%20s%5Bi..j%5D.to_string()%3B%0A%20%20%20%20println!(%22%7B%7D%22%2C%20t)%3B%0A%7D%0A&version=stable
Demo URL
https://play.rust-lang.org/?code=fn%20main()%20%7B%0A%20%20%20%20let%20s%20%3D%20%22Lorem%20Ipsum%20Dolor%22%3B%0A%20%20%20%20let%20(i%2C%20j)%20%3D%20(6%2C%2011)%3B%0A%20%20%20%20let%20t%20%3D%20s%5Bi..j%5D.to_string()%3B%0A%20%20%20%20println!(%22%7B%7D%22%2C%20t)%3B%0A%7D%0A&version=stable
Comments bubble
Comments bubble