Skip to main content

substr

Function substr 

Source
pub fn substr(s: &[u8], offset: i64, length: Option<i64>) -> &[u8] ⓘ
Expand description

PHP substr($string, $offset, $length): a negative offset counts from the end; a negative length stops that many bytes before the end; None takes the rest. Out-of-range values clamp; never fails.