Update CCString.mli for take_while, rtake_while

This commit is contained in:
mobotsar 2025-01-01 00:47:17 -05:00 committed by GitHub
parent d8c00f96be
commit 1498158a4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 *)