package dolmen
Module Builtin.StrSource
type _ t = | T(*
*)String: ttype: type constructor for strings.| Raw of string(*
*)Str s: String: string literals.| Length(*
*)Str_length: String -> Int: string length.| At(*
*)Str_at: String -> Int -> String: Singleton string containing a character at given position or empty string when position is out of range. The leftmost position is 0.| To_code(*
*)Str_to_code: String -> Int:Str_to_code sis the code point of the only character of s, if s is a singleton string; otherwise, it is -1.| Of_code(*
*)Str_of_code: Int -> String:Str_of_code nis the singleton string whose only character is code point n if n is in the range0, 196607; otherwise, it is the empty string.| Is_digit(*
*)Str_is_digit: String -> Prop.T: Digit checkStr.is_digit sis true iff s consists of a single character which is a decimal digit, that is, a code point in the range 0x0030 ... 0x0039.| To_int(*
*)Str_to_int: String -> Int: Conversion to integersStr.to_int swith s consisting of digits (in the sense of str.is_digit) evaluates to the positive integer denoted by s when seen as a number in base 10 (possibly with leading zeros). It evaluates to -1 if s is empty or contains non-digits.| Of_int(*
*)Str_of_int : Int -> String: Conversion from integers.Str.from_int nwith n non-negative is the corresponding string in decimal notation, with no leading zeros. If n < 0, it is the empty string.| Concat(*
*)Str_concat: String -> String -> String: string concatenation.| Sub(*
*)Str_sub: String -> Int -> Int -> String:Str_sub s i nevaluates to the longest (unscattered) substring of s of length at most n starting at position i. It evaluates to the empty string if n is negative or i is not in the interval0,l-1where l is the length of s.| Index_of(*
*)Str_index_of: String -> String -> Int -> Int: Index of first occurrence of second string in first one starting at the position specified by the third argument.Str_index_of s t i, with 0 <= i <= |s| is the position of the first occurrence of t in s at or after position i, if any. Otherwise, it is -1. Note that the result is i whenever i is within the range0, |s|and t is empty.| Replace(*
*)Str_replace: String -> String -> String -> String: ReplaceStr_replace s t t'is the string obtained by replacing the first occurrence of t in s, if any, by t'. Note that if t is empty, the result is to prepend t' to s; also, if t does not occur in s then the result is s.| Replace_all(*
*)Str_replace_all: String -> String -> String -> String:Str_replace_all s t t’is s if t is the empty string. Otherwise, it is the string obtained from s by replacing all occurrences of t in s by t’, starting with the first occurrence and proceeding in left-to-right order.| Replace_re(*
*)Str_replace_re: String -> String_RegLan -> String -> String:Str_replace_re s r tis the string obtained by replacing the shortest leftmost non-empty match of r in s, if any, by t. Note that if t is empty, the result is to prepend t to s.| Replace_re_all(*
*)Str_replace_re_all: String -> String_RegLan -> String -> String:Str_replace_re_all s r tis the string obtained by replacing, left-to right, each shortest *non-empty* match of r in s by t.| Is_prefix(*
*)Str_is_prefix: String -> String -> Prop.T: Prefix checkStr_is_prefix s tis true iff s is a prefix of t.| Is_suffix(*
*)Str_is_suffix: String -> String -> Prop.T: Suffix checkStr_is_suffix s tis true iff s is a suffix of t.| Contains(*
*)Str_contains: String -> String -> Prop.T: Inclusion checkStr_contains s tis true iff s contains t.| Lexicographic_strict(*
*)Str_lexicographic_strict: String -> String -> Prop.T: lexicographic ordering (strict).| Lexicographic_large(*
*)Str_lexicographic_large: String -> String -> Prop.T: reflexive closure of the lexicographic ordering.| In_re(*
*)Str_in_re: String -> String_RegLan -> Prop.T: set membership.