pub fn substring(string: &str, begin: i32, end: i32) -> StringExpand description
Returns the substring between the given begin index and end index. The first character of string is at index 0
- begin –> inclusive
- end –> exclusive
§Example:
let input: &str = "Hello, World!";
let result: String = funny_string::substring(input, 2, 6);
// result now contains the string "llo,"