Restores a cursor from a string previously created by
am_cursor_to_string(). The text object is required to associate the
cursor with a document.
Examples
doc <- am_create()
am_put(doc, AM_ROOT, "text", am_text("Hello World"))
text_obj <- am_get(doc, AM_ROOT, "text")
cursor <- am_cursor(text_obj, 5)
str <- am_cursor_to_string(cursor)
restored <- am_cursor_from_string(str, text_obj)
restored
#> <Automerge Cursor>
am_cursor_position(restored) # 5
#> [1] 5
am_close(doc)