comparison lib/ur/string.urs @ 1390:65fbb250b875

More string processing
author Adam Chlipala <adam@chlipala.net>
date Thu, 13 Jan 2011 10:02:50 -0500
parents 9a721f0722d3
children 2da693675de9
comparison
equal deleted inserted replaced
1389:9a721f0722d3 1390:65fbb250b875
9 9
10 val sub : t -> int -> char 10 val sub : t -> int -> char
11 val suffix : t -> int -> string 11 val suffix : t -> int -> string
12 12
13 val index : t -> char -> option int 13 val index : t -> char -> option int
14 val sindex : {Haystack : t, Needle : t} -> option int
14 val atFirst : t -> char -> option string 15 val atFirst : t -> char -> option string
15 16
16 val mindex : {Haystack : t, Needle : t} -> option int 17 val mindex : {Haystack : t, Needle : t} -> option int
17 18
18 val substring : t -> {Start : int, Len : int} -> string 19 val substring : t -> {Start : int, Len : int} -> string
22 23
23 val split : t -> char -> option (string * string) 24 val split : t -> char -> option (string * string)
24 val split' : t -> char -> option (string * string) (* The matched character is kept at the beginning of the suffix. *) 25 val split' : t -> char -> option (string * string) (* The matched character is kept at the beginning of the suffix. *)
25 val msplit : {Haystack : t, Needle : t} -> option (string * char * string) 26 val msplit : {Haystack : t, Needle : t} -> option (string * char * string)
26 27
28 val ssplit : {Haystack : t, Needle : t} -> option (string * string)
29
27 val all : (char -> bool) -> string -> bool 30 val all : (char -> bool) -> string -> bool
28 val mp : (char -> char) -> string -> string 31 val mp : (char -> char) -> string -> string
29 32
30 val newlines : ctx ::: {Unit} -> [[Body] ~ ctx] => string -> xml ([Body] ++ ctx) [] [] 33 val newlines : ctx ::: {Unit} -> [[Body] ~ ctx] => string -> xml ([Body] ++ ctx) [] []
31 34