Skip to content

Commit 60a855e

Browse files
Update main.rs
1 parent 097b3bd commit 60a855e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main.rs

+12
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,18 @@ impl Executor {
507507
));
508508
}
509509

510+
// Change string style case
511+
"case" => {
512+
let types = self.pop_stack().get_string();
513+
let text = self.pop_stack().get_string();
514+
515+
self.stack.push(Type::String(match types.as_str() {
516+
"lower" => text.to_lowercase(),
517+
"upper" => text.to_uppercase(),
518+
_ => text,
519+
}));
520+
}
521+
510522
// Generate a string by concat list
511523
"join" => {
512524
let key = self.pop_stack().get_string();

0 commit comments

Comments
 (0)