Skip to content

Commit

Permalink
Remove unused function String.drop_suffix
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
  • Loading branch information
gridbugs committed Dec 6, 2022
1 parent 1c2cc07 commit d159387
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions stdext/string.ml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ let drop_prefix s ~prefix =
else Some (sub s ~pos:(length prefix) ~len:(length s - length prefix))
else None

let drop_suffix s ~suffix =
if is_suffix s ~suffix then
if length s = length suffix then Some s
else Some (sub s ~pos:0 ~len:(length s - length suffix))
else None

let index = index_opt
let rindex = rindex_opt

Expand Down
1 change: 0 additions & 1 deletion stdext/string.mli
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ val extract_blank_separated_words : string -> string list
val is_prefix : string -> prefix:string -> bool
val is_suffix : string -> suffix:string -> bool
val drop_prefix : string -> prefix:string -> string option
val drop_suffix : string -> suffix:string -> string option

module Map : Map.S with type key = string

0 comments on commit d159387

Please sign in to comment.