* [Caml-list] Filename.split_extension
@ 2016-07-25 18:35 Hendrik Boom
2016-07-25 18:43 ` Daniel Bünzli
0 siblings, 1 reply; 4+ messages in thread
From: Hendrik Boom @ 2016-07-25 18:35 UTC (permalink / raw)
To: caml-list
I'm trying to use split a filename with a extension into the bane abd
the extension.
I've found Filename.split_extension in
https://ocaml.janestreet.com/ocaml-core/109.07.00/doc/core/Filename.html
but it seems not to be available on the Ocaml I'm using. Though
Filename.dirname and Filename.basename are available.
Now th documentation I used was from jandstreet. It's entirelly
possible that "normal" Ocaml has a different library, and different
documentation.
Where should I be looking?
-- hendrik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Filename.split_extension
2016-07-25 18:35 [Caml-list] Filename.split_extension Hendrik Boom
@ 2016-07-25 18:43 ` Daniel Bünzli
2016-07-25 19:03 ` Hendrik Boom
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Bünzli @ 2016-07-25 18:43 UTC (permalink / raw)
To: Hendrik Boom; +Cc: caml-list
Le lundi, 25 juillet 2016 à 20:35, Hendrik Boom a écrit :
> Where should I be looking?
Here http://caml.inria.fr/pub/docs/manual-ocaml/stdlib.html
Best,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Filename.split_extension
2016-07-25 18:43 ` Daniel Bünzli
@ 2016-07-25 19:03 ` Hendrik Boom
2016-07-25 19:15 ` Daniel Bünzli
0 siblings, 1 reply; 4+ messages in thread
From: Hendrik Boom @ 2016-07-25 19:03 UTC (permalink / raw)
To: caml-list
On Mon, Jul 25, 2016 at 08:43:46PM +0200, Daniel Bünzli wrote:
> Le lundi, 25 juillet 2016 à 20:35, Hendrik Boom a écrit :
> > Where should I be looking?
>
> Here http://caml.inria.fr/pub/docs/manual-ocaml/stdlib.html
I see. There's a funcction to test for a particulat extension
(check_suffix), and functions to chop the suffix off (chop_suffix if
you know what it is and chop_extension if you don't) but none to return
the extension.
OK. I can manage with that.
-- hendrik
>
> Best,
>
> Daniel
>
Thanks.
>
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Filename.split_extension
2016-07-25 19:03 ` Hendrik Boom
@ 2016-07-25 19:15 ` Daniel Bünzli
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Bünzli @ 2016-07-25 19:15 UTC (permalink / raw)
To: Hendrik Boom; +Cc: caml-list
Le lundi, 25 juillet 2016 à 21:03, Hendrik Boom a écrit :
> I see. There's a funcction to test for a particulat extension
> (check_suffix), and functions to chop the suffix off (chop_suffix if
> you know what it is and chop_extension if you don't) but none to return
> the extension.
The Filename module is a little bit underpowered you might be interested in this PR:
https://github.com/ocaml/ocaml/pull/669
which will be available in 4.04.
If you don't mind a dependency you could use
http://erratique.ch/software/fpath/doc/Fpath
Best,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-25 19:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25 18:35 [Caml-list] Filename.split_extension Hendrik Boom
2016-07-25 18:43 ` Daniel Bünzli
2016-07-25 19:03 ` Hendrik Boom
2016-07-25 19:15 ` Daniel Bünzli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox