substr

Function substr 

Source
pub fn substr(s: &str, start: i64, length: Option<i64>) -> Result<String>
Expand description

JavaScript-like substr(start, length) using UTF-16 code-unit indices.

start may be negative (relative to the end). length is clamped to >= 0 and truncated to the remaining string length.