diff --git a/src/core/CCString.mli b/src/core/CCString.mli index 0e5e7ba0..519c42a5 100644 --- a/src/core/CCString.mli +++ b/src/core/CCString.mli @@ -182,6 +182,14 @@ val take : int -> string -> string (** [take n s] keeps only the [n] first chars of [s]. @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 (** [drop n s] removes the [n] first chars of [s]. @since 0.17 *)