Mercurial > urweb
annotate lib/ur/string.urs @ 1080:a4979e31e4bf
Another try at reasonable Especialize, this time with a custom traversal
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 20 Dec 2009 15:17:43 -0500 |
parents | eaba663fd6aa |
children | 85d194409b17 |
rev | line source |
---|---|
adamc@821 | 1 type t = string |
adamc@821 | 2 |
adamc@1023 | 3 val str : char -> t |
adamc@1023 | 4 |
adamc@828 | 5 val length : t -> int |
adamc@828 | 6 |
adamc@828 | 7 val append : t -> t -> t |
adamc@828 | 8 |
adamc@821 | 9 val sub : t -> int -> char |
adamc@821 | 10 val suffix : t -> int -> string |
adamc@829 | 11 |
adamc@829 | 12 val index : t -> char -> option int |
adamc@829 | 13 val atFirst : t -> char -> option string |
adamc@829 | 14 |
adamc@831 | 15 val mindex : {Haystack : t, Needle : t} -> option int |
adamc@831 | 16 |
adamc@829 | 17 val substring : t -> {Start : int, Len : int} -> string |
adamc@829 | 18 |
adamc@829 | 19 val split : t -> char -> option (string * string) |
adamc@831 | 20 val msplit : {Haystack : t, Needle : t} -> option (string * char * string) |
adamc@1057 | 21 |
adamc@1057 | 22 val all : (char -> bool) -> string -> bool |