Skip to content

Commit 0d2ecf1

Browse files
feat: add string manipulation functions for trimming
1 parent 5b6d22f commit 0d2ecf1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Runtime/StringValue.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ public function __construct(string $value)
1919
"lower" => new FunctionValue(fn() => new StringValue(strtolower($this->value))),
2020
"strip" => new FunctionValue(fn() => new StringValue(trim($this->value))),
2121
"title" => new FunctionValue(fn() => new StringValue(toTitleCase($this->value))),
22-
"length" => new NumericValue(strlen($this->value))
22+
"length" => new NumericValue(strlen($this->value)),
23+
"rstrip" => new FunctionValue(fn() => new StringValue(rtrim($this->value))),
24+
"lstrip" => new FunctionValue(fn() => new StringValue(ltrim($this->value)))
2325
];
2426
}
25-
2627
}

0 commit comments

Comments
 (0)