Created
January 31, 2012 00:21
-
-
Save camt/1707761 to your computer and use it in GitHub Desktop.
Strip 'X' end characters from a string with PHP. This is faster for longer strings, as it does not need to count it's way to the end of the string first.
This file contains hidden or 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
$string = strrev(substr(strrev($string), 2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment