mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
Update CCString.mli for take_while, rtake_while
This commit is contained in:
parent
d8c00f96be
commit
1498158a4f
1 changed files with 8 additions and 0 deletions
|
|
@ -182,6 +182,14 @@ val take : int -> string -> string
|
||||||
(** [take n s] keeps only the [n] first chars of [s].
|
(** [take n s] keeps only the [n] first chars of [s].
|
||||||
@since 0.17 *)
|
@since 0.17 *)
|
||||||
|
|
||||||
|
val take_while : (char -> bool) -> string -> string
|
||||||
|
(** [take_while p s] keeps only the longest prefix [t] of [s] such that every
|
||||||
|
character [c] in [t] satisfies [f c]. *)
|
||||||
|
|
||||||
|
val rtake_while : (char -> bool) -> string -> string
|
||||||
|
(** [rtake_while p s] keeps only the longest suffix [t] of [s] such that every
|
||||||
|
character [c] in [t] satisfies [f c]. *)
|
||||||
|
|
||||||
val drop : int -> string -> string
|
val drop : int -> string -> string
|
||||||
(** [drop n s] removes the [n] first chars of [s].
|
(** [drop n s] removes the [n] first chars of [s].
|
||||||
@since 0.17 *)
|
@since 0.17 *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue