public static String squashSpaces(String s) { if (string.IsNullOrEmpty(s)) { return(null); } return(SQUASH_SPACES.Replace(s, " ")); // replace with single space }
public static String stripGarminCodes(String s) { if (s == null) { return(null); } s = SHIELDS.Replace(s, ""); // remove s = SEPARATORS.Replace(s, " "); // replace with a space s = SQUASH_SPACES.Replace(s, " "); // replace with a space // a leading separator would have turned into a space so trim it return(s.Trim()); }