Archive for October, 2009
Joke Time
Why did the computer programmer always confuse Halloween and Christmas?
strcspn()
Finds the first substring which contains only chars not in the list given and returns its length. You can specify a start position and max length.
strspn()
Finds the first substring which contains only the chars in the list given and returns its length. You can specify a start position and max length.
strrpos()
Find the position of the last occurrence of a substring.
chr()
Get the character represented by the given ASCII value.
ord()
Get the ASCII value of a character.
ltrim()
Returns to you a string with whitespace removed from the beginning of the string passed to it. You can also pass in a list of characters for it to remove instead.
rtrim()
Returns to you a string with whitespace removed from the end of the string passed to it. You can also pass in a list of characters for it to remove instead.
str_ireplace()
Case-insensitive version of str_replace().
strtr()
Translate characters or substrings of a string. Doesn’t “double translate” as it goes.
