Function voca_rs::chop::substr [−][src]
pub fn substr(subject: &str, start: usize, length: usize) -> String
Extracts from subject
a string from start
position a number of length
characters.
Arguments
subject
- The string to extract from.start
- The position to start extraction. 0 means extract from the beginning of thesubject
.length
- The number of characters to extract. 0 means extract to the end ofsubject
.
Example
use voca_rs::*; chop::substr("beach", 1, 0); // => "each" chop::substr("błąd", 1, 2); // => "łą"