String cleanSelectorString(String selector){
  boolean lastWasSpace=true;
  for (int counter=0, maxCounter=selector.length(); counter < maxCounter; counter++) {
switch (selector.charAt(counter)) {
case ' ':
      if (lastWasSpace) {
        return _cleanSelectorString(selector);
      }
    lastWasSpace=true;
  break;
case '\n':
case '\r':
case '\t':
return _cleanSelectorString(selector);
default :
lastWasSpace=false;
}
}
if (lastWasSpace) {
return _cleanSelectorString(selector);
}
return selector;
}

String cleanSelectorString ( String selector ) { boolean lastWasSpace = true ; for ( int counter = 0 , maxCounter = selector . length ( ) ; counter < maxCounter ; counter ++ ) { switch ( selector . charAt ( counter ) ) { case ' ' : if ( lastWasSpace ) { return _cleanSelectorString ( selector ) ; } lastWasSpace = true ; break ; case '\n' : case '\r' : case '\t' : return _cleanSelectorString ( selector ) ; default : lastWasSpace = false ; } } if ( lastWasSpace ) { return _cleanSelectorString ( selector ) ; } return selector ; }
returns a string that only has one space between simple selectors , which may be the passed in string .
