Mercurial > urweb
annotate lib/ur/string.urs @ 1729:6817ddd6cf1f
Avoid generating empty <script> tags
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 27 Apr 2012 09:52:16 -0400 |
parents | 65fbb250b875 |
children | 2da693675de9 |
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 |
adam@1388 | 6 val lengthGe : t -> int -> bool |
adamc@828 | 7 |
adamc@828 | 8 val append : t -> t -> t |
adamc@828 | 9 |
adamc@821 | 10 val sub : t -> int -> char |
adamc@821 | 11 val suffix : t -> int -> string |
adamc@829 | 12 |
adamc@829 | 13 val index : t -> char -> option int |
adam@1390 | 14 val sindex : {Haystack : t, Needle : t} -> option int |
adamc@829 | 15 val atFirst : t -> char -> option string |
adamc@829 | 16 |
adamc@831 | 17 val mindex : {Haystack : t, Needle : t} -> option int |
adamc@831 | 18 |
adamc@829 | 19 val substring : t -> {Start : int, Len : int} -> string |
adamc@829 | 20 |
adam@1389 | 21 val seek : t -> char -> option string |
adam@1389 | 22 val mseek : {Haystack : t, Needle : t} -> option (char * string) |
adam@1389 | 23 |
adamc@829 | 24 val split : t -> char -> option (string * string) |
adam@1389 | 25 val split' : t -> char -> option (string * string) (* The matched character is kept at the beginning of the suffix. *) |
adamc@831 | 26 val msplit : {Haystack : t, Needle : t} -> option (string * char * string) |
adamc@1057 | 27 |
adam@1390 | 28 val ssplit : {Haystack : t, Needle : t} -> option (string * string) |
adam@1390 | 29 |
adamc@1057 | 30 val all : (char -> bool) -> string -> bool |
adamc@1131 | 31 val mp : (char -> char) -> string -> string |
adamc@1122 | 32 |
adamc@1122 | 33 val newlines : ctx ::: {Unit} -> [[Body] ~ ctx] => string -> xml ([Body] ++ ctx) [] [] |
adamc@1174 | 34 |
adamc@1174 | 35 val isPrefix : {Full : t, Prefix : t} -> bool |