mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 19:25:28 -05:00
Add String.is_empty
This commit is contained in:
parent
c66c96d252
commit
e20d0ccfcc
2 changed files with 5 additions and 0 deletions
|
|
@ -52,6 +52,8 @@ let init = String.init
|
|||
|
||||
let length = String.length
|
||||
|
||||
let is_empty s = equal s ""
|
||||
|
||||
let rev s =
|
||||
let n = length s in
|
||||
init n (fun i -> s.[n-i-1])
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ val equal : string -> string -> bool
|
|||
|
||||
val compare : string -> string -> int
|
||||
|
||||
val is_empty : string -> bool
|
||||
(** @since NEXT_RELEASE *)
|
||||
|
||||
val hash : string -> int
|
||||
|
||||
val init : int -> (int -> char) -> string
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue