initial commit of Str.trimLeft

This commit is contained in:
Michael Downey 2021-11-09 14:25:24 -05:00
parent 35df58c18f
commit 1bc278d962
13 changed files with 159 additions and 7 deletions

View file

@ -632,6 +632,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
Box::new(str_type())
);
// trimLeft: Str -> Str
add_top_level_function_type!(
Symbol::STR_TRIM_LEFT,
vec![str_type()],
Box::new(str_type())
);
// trim : Str -> Str
add_top_level_function_type!(Symbol::STR_TRIM, vec![str_type()], Box::new(str_type()));