[eluser]bena[/eluser]
Hi peeps,
Thought I'd share some functions I find quite handy when I'm developing. There's also a little guide for anyone interested in using them.
is_str() - a more solid version of the is_string() function
str_append() - appends a string to a string if not already present
str_prepend() - prepends a string to a string if not already present
str_convert_special() - converts special characters to an appropriate equivalent (I think this was based on something I saw in wordpress)
str_numonly() - strips everything except numbers from a string (lazy I know)
str_safemail() - formats an email address for safer use in HTML pages
_now() - technically belongs in a date helper... it's just like CI's now() function but supports a few different output formats (date|time|datetime|unix)
Please let me know if there are already functions out there doing the same thing!
Hope someone finds them useful.
Regards,
Ben