mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
minor changes
This commit is contained in:
parent
938c7cb90a
commit
9c72797515
2 changed files with 4 additions and 4 deletions
|
|
@ -657,12 +657,12 @@ let take len : slice t = {
|
|||
)
|
||||
}
|
||||
|
||||
let any_chars len : _ t = take len >|= Slice.to_string
|
||||
let any_char_n len : _ t = take len >|= Slice.to_string
|
||||
|
||||
let exact s = {
|
||||
run=fun st ~ok ~err ->
|
||||
(* parse a string of length [String.length s] and compare with [s] *)
|
||||
(any_chars (String.length s)).run st
|
||||
(any_char_n (String.length s)).run st
|
||||
~ok:(fun st s2 ->
|
||||
if string_equal s s2 then ok st s
|
||||
else (
|
||||
|
|
|
|||
|
|
@ -190,8 +190,8 @@ val any_char : char t
|
|||
It still fails if the end of input was reached.
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val any_chars : int -> string t
|
||||
(** [any_chars len] parses exactly [len] characters from the input.
|
||||
val any_char_n : int -> string t
|
||||
(** [any_char_n len] parses exactly [len] characters from the input.
|
||||
Fails if the input doesn't contain at least [len] chars.
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue