Skip to content

Commit 296e63d

Browse files
committed
use string functions to mod
1 parent da4760c commit 296e63d

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/builtin_function/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ pub fn function_match(function_name: &str) -> Option<BuiltinFunction> {
8080
"length" | "len" => Some(strings::length::length),
8181
"contains" | "has" => Some(strings::contains::contains),
8282
"slice" | "substring" => Some(strings::slice::slice),
83+
"charat" => Some(strings::char_at::char_at),
84+
"toupper" | "uppercase" => Some(strings::to_upper::to_upper),
85+
"tolower" | "lowercase" => Some(strings::to_lower::to_lower),
86+
"trim" => Some(strings::trim::trim),
8387
"insert" | "push" => Some(list::insert::insert),
8488
"get" | "at" => Some(list::get::get),
8589
"pop" => Some(list::pop::pop),
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
pub mod char_at;
12
pub mod contact;
23
pub mod contains;
34
pub mod length;
45
pub mod repeat;
56
pub mod slice;
7+
pub mod to_lower;
8+
pub mod to_upper;
9+
pub mod trim;

0 commit comments

Comments
 (0)