Logo

Programming-Idioms

History of Idiom 38 > diff from v60 to v61

Edit summary for version 61 by Anders429:
New Rust implementation by user [Anders429]

Version 60

2020-10-10, 22:59:17

Version 61

2020-10-21, 00:46:16

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)

Illustration

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)

Illustration
Variables
t,i,j,s
Variables
t,i,j,s
Imports
use substring::Substring;
Code
let t = s.substring(i, j);
Doc URL
https://docs.rs/substring/