// 11. If fullUnicode is true, let input be StringToCodePoints(S). Otherwise, let input be a List whose elements are the code units that are the elements of S.
// NOTE: The following steps are take care of by regress:
// 12. NOTE: Each element of input is considered to be a character.
//
// SKIP: 10. Let matchSucceeded be false.
// 10. Let matchSucceeded be false.
// SKIP: 11. If fullUnicode is true, let input be StringToCodePoints(S). Otherwise, let input be a List whose elements are the code units that are the elements of S.
// 13. Repeat, while matchSucceeded is false,
// SKIP: 12. NOTE: Each element of input is considered to be a character.
letmatch_value=loop{
// SKIP: 13. Repeat, while matchSucceeded is false,
// a. If lastIndex > length, then
iflast_index>length{
// 13.a. If lastIndex > length, then
// i. If global is true or sticky is true, then
iflast_index>length{
ifglobal||sticky{
// i. If global is true or sticky is true, then
// 1. Perform ? Set(R, "lastIndex", +0𝔽, true).
ifglobal||sticky{
this.set(utf16!("lastIndex"),0,true,context)?;
// 1. Perform ? Set(R, "lastIndex", +0𝔽, true).
}
this.set(utf16!("lastIndex"),0,true,context)?;
}
// ii. Return null.
// ii. Return null.
returnOk(None);
returnOk(None);
}
// 13.b. Let inputIndex be the index into input of the character that was obtained from element lastIndex of S.