summaryrefslogtreecommitdiff
path: root/stdlib/filename.mli
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2021-06-20 11:06:17 +0200
committerXavier Leroy <xavier.leroy@college-de-france.fr>2021-06-20 11:06:17 +0200
commit70b03f9210b861cb8863f28ed32d441ee71a0530 (patch)
treec2dbaff1128a0d1dd0d12de4e2a86d7ebfc4f049 /stdlib/filename.mli
parent5bcddeb863aac4977d7fc212b893e97ecab36840 (diff)
downloadocaml-70b03f9210b861cb8863f28ed32d441ee71a0530.tar.gz
Filename.chop_suffix: fail cleanly when not a suffix
Diffstat (limited to 'stdlib/filename.mli')
-rw-r--r--stdlib/filename.mli5
1 files changed, 2 insertions, 3 deletions
diff --git a/stdlib/filename.mli b/stdlib/filename.mli
index 443e06a507..77dbed24e2 100644
--- a/stdlib/filename.mli
+++ b/stdlib/filename.mli
@@ -51,9 +51,8 @@ val check_suffix : string -> string -> bool
val chop_suffix : string -> string -> string
(** [chop_suffix name suff] removes the suffix [suff] from
- the filename [name]. The behavior is undefined if [name] does not
- end with the suffix [suff]. [chop_suffix_opt] is thus recommended
- instead.
+ the filename [name].
+ @raise Invalid_argument if [name] does not end with the suffix [suff].
*)
val chop_suffix_opt: suffix:string -> string -> string option