Ejemplo n.º 1
0
 public static String squashSpaces(String s)
 {
     if (string.IsNullOrEmpty(s))
     {
         return(null);
     }
     return(SQUASH_SPACES.Replace(s, " ")); // replace with single space
 }
Ejemplo n.º 2
0
 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());
 }