RE: Slang Replacer
Split the input message by a space and loop through each element. Check each element in turn to see if it matches a pre-defined list of known 'slang' words. (For bonus points strip punctuation out of it and preserve it later on!) If it does, replace that array element with a replacement (figure out an associative array or somesuch for it, else use a txt file, far better). Join the array back together by spaces and send it.
This post was edited on 07-16-2006 at 10:06 PM by segosa.
The previous sentence is false. The following sentence is true.
|