diff --git a/src/core/CCString.mli b/src/core/CCString.mli index 3cca9365..e280c381 100644 --- a/src/core/CCString.mli +++ b/src/core/CCString.mli @@ -184,11 +184,13 @@ val take : int -> string -> string 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 [p c]. *) + character [c] in [t] satisfies [p c]. + @since 3.16 *) 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 [p c]. *) + character [c] in [t] satisfies [p c]. + @since 3.16 *) val drop : int -> string -> string (** [drop n s] removes the [n] first chars of [s]. diff --git a/src/core/CCStringLabels.mli b/src/core/CCStringLabels.mli index 318e8237..a3d4f358 100644 --- a/src/core/CCStringLabels.mli +++ b/src/core/CCStringLabels.mli @@ -193,6 +193,16 @@ val take : int -> string -> string (** [take n s] keeps only the [n] first chars of [s]. @since 0.17 *) +val take_while : p:(char -> bool) -> string -> string +(** [take_while ~p s] keeps only the longest prefix [t] of [s] such that every + character [c] in [t] satisfies [p c]. + @since 3.16 *) + +val rtake_while : p:(char -> bool) -> string -> string +(** [rtake_while ~p s] keeps only the longest suffix [t] of [s] such that every + character [c] in [t] satisfies [p c]. + @since 3.16 *) + val drop : int -> string -> string (** [drop n s] removes the [n] first chars of [s]. @since 0.17 *)