Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Just found this little nugget... So much wrong with this.
public static class CleanString
{
public static string CleanString(this String str)
{
if (str != "" && str != null)
{
str = str.Replace("!", "");
str = str.Replace("£", "");
str = str.Replace("$", "");
str = str.Replace("%", "");
str = str.Replace("^", "");
str = str.Replace("&", "");
str = str.Replace("*", "");
str = str.Replace("(", "");
str = str.Replace(")", "");
str = str.Replace("-", "");
str = str.Replace("=", "");
str = str.Replace("{", "");
str = str.Replace("}", "");
str = str.Replace("[", "");
str = str.Replace("]", "");
.....
return str;
}
}
}
rant