Last active
August 29, 2015 14:21
-
-
Save jasonvarga/5a33ea0c6b96a2016c0c to your computer and use it in GitHub Desktop.
ltrim_at Statamic Modifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Modifier_trim_at extends Modifier | |
{ | |
public function index($value, $parameters=array()) | |
{ | |
return ltrim($value, '@'); | |
} | |
} | |
/* | |
Usage: {{ value|ltrim_at }} would strip @ symbols from the left side of the string | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment