You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 2370 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Salut,
The documentation for Str.search_backward in 3.07pl2 is unclear. See: http://caml/ocaml/htmlman/libref/Str.html. In particular, it doesn't
mention that the returned substring can overhang the position
argument.
I suggest the following rewording:
[[search_backward r s last]] searches the string [[s]] for a
substring matching the regular expression [[r]]. The search first
considers substrings that start at position [[last]] and proceeds
towards the beginning of string. Return the position of the first
character of the matched substring, or [[raise Not_found]] if no
substring matches.
Also, there's a typo in the search_forward doc just above: searchs'' |-> searches''.
Amicalement,
James
The text was updated successfully, but these errors were encountered:
Original bug ID: 2370
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Salut,
The documentation for Str.search_backward in 3.07pl2 is unclear. See:
http://caml/ocaml/htmlman/libref/Str.html. In particular, it doesn't
mention that the returned substring can overhang the position
argument.
I suggest the following rewording:
[[search_backward r s last]] searches the string [[s]] for a
substring matching the regular expression [[r]]. The search first
considers substrings that start at position [[last]] and proceeds
towards the beginning of string. Return the position of the first
character of the matched substring, or [[raise Not_found]] if no
substring matches.
Also, there's a typo in the search_forward doc just above:
searchs'' |->
searches''.Amicalement,
James
The text was updated successfully, but these errors were encountered: