[][src]Function boa::js::string::substring

pub fn substring(
    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 is contained between the start index and the end index. When both the start and end arguments are specified, the smaller one represent the index of the code unit from which the returned String will start and the larger one the index of the code unit just after the end. When only the start index is specified, the end index defaults to being the length of the string. When no argument is specified, the returned String is the same as the original https://tc39.es/ecma262/#sec-string.prototype.substring