static private boolean isSlashEscapedChar ( String s , int pos ) { // Count the backslashes preceding this position. If it's // even, there is no escape and the slashes are just literals. // If it's odd, one of the slashes (the last one) is escaping // the character at the given position. int numSlashes = 0 ; while ( pos > 0 && ( s . charAt ( pos - 1 ) == ' ' ) ) { pos -- ; numSlashes ++ ; } return numSlashes % 2 != 0 ; }
Determines if the character at the specified position of a string is escaped with a backslash