Skip to content

Commit

Permalink
Added methods
Browse files Browse the repository at this point in the history
- ltrim
- rtrim
- base64encode
  • Loading branch information
hipsterjazzbo committed May 25, 2020
1 parent b12e1da commit 6b7e0f7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,27 @@ public function trim($charList = " \t\n\r\0\x0B"): self
return static::create($str);
}

public function ltrim($charList = " \t\n\r\0\x0B"): self
{
$str = ltrim($this->str, $charList);

return static::create($str);
}

public function rtrim($charList = " \t\n\r\0\x0B"): self
{
$str = rtrim($this->str, $charList);

return static::create($str);
}

public function base64encode(): self
{
$str = base64_encode($this->str);

return static::create($str);
}

/////////////////////////////////////////
/// Search and Query
/////////////////////////////////////////
Expand Down

0 comments on commit 6b7e0f7

Please sign in to comment.