Version: v0.8.1 - Beta.  We welcome contributors & feedback.

String.toCivilized

toCivilized($textType='comment') -> string

Description

Fix obnoxious patterns in a user-submitted string, by applying these filters:

$comment = 'AAAAAAAAAH HELP ME FIX THIS!!!!!!!!!'
$comment.toCivilized('comment')
//= 'Aaah help me fix this!'

$title = 'HOW TO ORDER BOOK PLS????'
$title.toCivilized('title')
//= 'How To Order Book Please?'

See Also