The standard library Substring api defines access to functionality allowing parts of String instances to be referenced in constant time in space.
The Substring api is implemented by the substring package.
The Substring api source code is in src/lib/core/init/substring.api from which it propagates to (e.g.) src/lib/std/src/substring.api.
See also: String.
See also: Typelocked_Vector_Slice.
See also: Typelocked_Rw_Vector_Slice.
The above information is manually maintained and may contain errors.
api { eqtype Char; eqtype String; Substring; get : (Substring , Int) -> Char; size : Substring -> Int; burst_substring : Substring -> (String , Int , Int); extract : (String , Int , Null_Or(Int )) -> Substring; make_substring : (String , Int , Int) -> Substring; from_string : String -> Substring; to_string : Substring -> String; is_empty : Substring -> Bool; getc : Substring -> Null_Or(((Char , Substring)) ); first : Substring -> Null_Or(Char ); drop_first : Int -> Substring -> Substring; drop_last : Int -> Substring -> Substring; make_slice : (Substring , Int , Null_Or(Int )) -> Substring; cat : List(Substring ) -> String; join : String -> List(Substring ) -> String; join' : String -> String -> String -> List(Substring ) -> String; explode : Substring -> List(Char ); is_prefix : String -> Substring -> Bool; is_substring : String -> Substring -> Bool; is_suffix : String -> Substring -> Bool; compare : (Substring , Substring) -> Order; compare_sequences : ((Char , Char) -> Order) -> (Substring , Substring) -> Order; get_prefix : (Char -> Bool) -> Substring -> Substring; get_suffix : (Char -> Bool) -> Substring -> Substring; drop_prefix : (Char -> Bool) -> Substring -> Substring; drop_suffix : (Char -> Bool) -> Substring -> Substring; split_off_prefix : (Char -> Bool) -> Substring -> (Substring , Substring); split_off_suffix : (Char -> Bool) -> Substring -> (Substring , Substring); split_at : (Substring , Int) -> (Substring , Substring); position : String -> Substring -> (Substring , Substring); span : (Substring , Substring) -> Substring; translate : (Char -> String) -> Substring -> String; tokens : (Char -> Bool) -> Substring -> List(Substring ); fields : (Char -> Bool) -> Substring -> List(Substring ); apply : (Char -> Void) -> Substring -> Void; fold_forward : ((Char , X) -> X) -> X -> Substring -> X; fold_backward : ((Char , X) -> X) -> X -> Substring -> X;};