Created
January 9, 2009 17:11
-
-
Save anonymous/45182 to your computer and use it in GitHub Desktop.
This file contains 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
#From this | |
#Method to strip special characters from a string | |
def strip_specials(data) | |
if $config["strip_characters"] == 'true' | |
$config["characters_to_strip"].to_a.each do |char| | |
data.gsub!(char.chr,"") | |
end | |
end | |
return data | |
end | |
#To this! | |
#Method to strip special characters from a string | |
def strip_specials(data) | |
if $config["strip_characters"] == true | |
$config["characters_to_strip"].to_a.each do |char| | |
data.gsub!(char.chr,"") | |
end | |
end | |
return data | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment