ocaml-rope icon indicating copy to clipboard operation
ocaml-rope copied to clipboard

index_from_opt fails when offset equals length (unlike String.index_from_opt)

Open copy opened this issue 4 years ago • 0 comments

For example:

utop [0]: #require "rope";;
utop [1]: Rope.index_from_opt Rope.empty 0 'a';;
Exception: Invalid_argument "Rope.index_from_opt".
utop [2]: String.index_from_opt "" 0 'a';;
val _2 : int option = None

copy avatar Sep 06 '21 21:09 copy