public void Clean_WithAccentsInString_StripsAccentsOut() { string valToTest = "AKéSJDGHASDé"; string expected = "akesjdghasde"; var actual = cleaner.Clean(valToTest); Console.WriteLine(String.Format("Accented LowerCaseNormalize clean result = {0}", actual)); Assert.AreEqual(expected, actual); }
public string Clean(string value) { // do basic cleaning value = _sub.Clean(value); if (String.IsNullOrEmpty(value)) { return(""); } // do our stuff if (value.StartsWith("the ")) { value = value.Substring(4); } return(value); }
public string Clean(string value) { // do basic cleaning value = _sub.Clean(value); if (String.IsNullOrEmpty(value)) { return(""); } // do our stuff int ix = value.IndexOf(','); if (ix != -1) { value = value.Substring(0, ix); } return(value); }