[][src]Function boa::builtins::string::substr

pub fn substr(
    this: &Value,
    args: &[Value],
    ctx: &mut Interpreter
) -> ResultValue

Return a String which is a subset of the String value resulting from converting this object to a String. The subset of the string starts at the start index and is at most length code units long, depending if the string is shorter. When only the start index is specified, the length become the length of the string. When the start index is negative, the start index become the number of code units from the end of the string. When no argument is specified, the returned String is the same as the original https://tc39.es/ecma262/#sec-string.prototype.substr