The standard library String api defines access to immutable vectors of characters.
The String api is implemented by the string package.
The String api source code is in src/lib/std/src/string.api.
See also: Rw_Vector.
See also: Substring.
See also: Char. The above information is manually maintained and may contain errors.
api { eqtype Char; eqtype String; maximum_vector_length : Int; length_in_bytes : String -> Int; length_in_chars : String -> Int; prefix_length_in_bytes : (String , Int) -> Int; get_byte : (String , Int) -> Int; get_byte_as_char : (String , Int) -> Char; get_char_as_int : (String , Int) -> (Int , Int); get_char_bytecount : (String , Int) -> Int; extract : (String , Int , Null_Or(Int )) -> String; substring : (String , Int , Int) -> String; + : (String , String) -> String; cat : List(String ) -> String; join : String -> List(String ) -> String; join' : String -> String -> String -> List(String ) -> String; from_char : Char -> String; implode : List(Char ) -> String; explode : String -> List(Char ); chomp : String -> String; map : (Char -> Char) -> String -> String; repeat : (String , Int) -> String; translate : (Char -> String) -> String -> String; tokens : (Char -> Bool) -> String -> List(String ); fields : (Char -> Bool) -> String -> List(String ); lines : String -> List(String ); longest_common_prefix : (String , String) -> String; drop_leading_whitespace : String -> String; drop_trailing_whitespace : String -> String; is_prefix : String -> String -> Bool; is_substring : String -> String -> Bool; is_suffix : String -> String -> Bool; find_substring : String -> String -> Null_Or(Int ); find_substring' : String -> (String , Int) -> Null_Or(Int ); find_substring_backward : String -> String -> Null_Or(Int ); find_substring_backward' : String -> (String , Int) -> Null_Or(Int ); compare : (String , String) -> Order; compare_sequences : ((Char , Char) -> Order) -> (String , String) -> Order; to_lower : String -> String; to_upper : String -> String; to_mixed : String -> String; has_alpha : String -> Bool; has_lower : String -> Bool; has_upper : String -> Bool; is_alpha : String -> Bool; is_upper : String -> Bool; is_lower : String -> Bool; is_mixed : String -> Bool; is_ascii : String -> Bool; < : (String , String) -> Bool; <= : (String , String) -> Bool; > : (String , String) -> Bool; >= : (String , String) -> Bool; from_string : String -> Null_Or(String ); to_string : String -> String; from_cstring : String -> Null_Or(String ); to_cstring : String -> String; byte_offset_of_ith_char : (String , Int) -> Null_Or(Int ); utf8_to_ucs2 : String -> String; expand_tabs_and_control_chars : {screencol1:Int, screencol2:Int, startcol:Int, utf8byte:Int, utf8text:String} -> {screencol1_byteoffset_in_screentext:Int, screencol1_byteoffset_in_utf8text:Int, screencol1_bytescount_in_screentext:Int, screencol1_bytescount_in_utf8text:Int, screencol1_colcount_on_screen:Int, screencol1_firstcol_on_screen:Int, screencol2_byteoffset_in_screentext:Int, screencol2_byteoffset_in_utf8text:Int, screencol2_bytescount_in_screentext:Int, screencol2_bytescount_in_utf8text:Int, screencol2_colcount_on_screen:Int, screencol2_firstcol_on_screen:Int, screentext:String, screentext_length_in_screencols:Int, startcol:Int, utf8byte_colcount_on_screen:Int, utf8byte_firstcol_on_screen:Int};};