* [Caml-list] Checking the usage of “Str.search_forward”
@ 2019-06-06 8:20 Markus Elfring
2019-06-06 11:34 ` Nicolás Ojeda Bär
0 siblings, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2019-06-06 8:20 UTC (permalink / raw)
To: caml-list
Hello,
I would like to use OCaml code like “try ignore (Str.search_forward (Str.regexp " when done") xb 6); …”.
Now I am looking for the explanation of the message “Fatal error:
exception Invalid_argument("Str.search_forward")”.
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Checking the usage of “Str.search_forward”
2019-06-06 8:20 [Caml-list] Checking the usage of “Str.search_forward” Markus Elfring
@ 2019-06-06 11:34 ` Nicolás Ojeda Bär
2019-06-06 14:07 ` Markus Elfring
0 siblings, 1 reply; 4+ messages in thread
From: Nicolás Ojeda Bär @ 2019-06-06 11:34 UTC (permalink / raw)
To: Markus Elfring; +Cc: OCaml Mailing List
Hi Markus,
Are you sure that String.length xb >= 6 ?
Cheers,
Nicolás
On Thu, Jun 6, 2019 at 10:33 AM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> Hello,
>
> I would like to use OCaml code like “try ignore (Str.search_forward (Str.regexp " when done") xb 6); …”.
> Now I am looking for the explanation of the message “Fatal error:
> exception Invalid_argument("Str.search_forward")”.
>
> Regards,
> Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Checking the usage of “Str.search_forward”
2019-06-06 11:34 ` Nicolás Ojeda Bär
@ 2019-06-06 14:07 ` Markus Elfring
2019-06-07 8:04 ` David Allsopp
0 siblings, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2019-06-06 14:07 UTC (permalink / raw)
To: Nicolás Ojeda Bär; +Cc: caml-list
> Are you sure that String.length xb >= 6 ?
* Do you expect the information “Raises Invalid_argument if the string length
is shorter than the passed start position”?
* Would an extension become helpful for the documentation of this function call?
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [Caml-list] Checking the usage of “Str.search_forward”
2019-06-06 14:07 ` Markus Elfring
@ 2019-06-07 8:04 ` David Allsopp
0 siblings, 0 replies; 4+ messages in thread
From: David Allsopp @ 2019-06-07 8:04 UTC (permalink / raw)
To: 'Markus Elfring', Nicolás Ojeda Bär; +Cc: caml-list
Markus Elfring wrote:
> > Are you sure that String.length xb >= 6 ?
>
> * Do you expect the information “Raises Invalid_argument if the string
> length is shorter than the passed start position”?
Yes, cf. https://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html#VALindex_from
> * Would an extension become helpful for the documentation of this
> function call?
Yes - would you be able to make a pull request?
David
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-07 8:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 8:20 [Caml-list] Checking the usage of “Str.search_forward” Markus Elfring
2019-06-06 11:34 ` Nicolás Ojeda Bär
2019-06-06 14:07 ` Markus Elfring
2019-06-07 8:04 ` David Allsopp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox