func (ins *NextString) Execute(_ *int, vm *VM) error {
	str := []rune(vm.Get(ins.Str).Value)
	pos := number.Int(number.NewNumber(vm.Get(ins.Cursor).Value))
	hasMore := pos < len(str)
	vm.Set(ins.Result, asttest.NewLiteralBool(hasMore))
	if hasMore {
		if ins.KeyResult != "" {
			vm.Set(ins.KeyResult, asttest.NewLiteralNumber(fmt.Sprintf("%d", pos)))
		}
		vm.Set(ins.ValueResult, asttest.NewLiteralChar(str[pos]))
		vm.Set(ins.Cursor, asttest.NewLiteralNumber(fmt.Sprintf("%d", pos+1)))
	}
	return nil
}
Execute implements the Instruction interface for the VM.
package vm
import (
	"fmt"
	"github.com/elliotchance/ok/ast/asttest"
	"github.com/elliotchance/ok/number"
)
type NextString struct {
	Str         Register  
	Cursor      Register  
	KeyResult   Register  
	ValueResult Register  
	Result      Register  
}