Changeset 41 in default for trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfFormatterVisitor.java
- Timestamp:
- 11/05/10 16:46:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfFormatterVisitor.java
r37 r41 144 144 StringBuffer whiteSpaces = new StringBuffer(); 145 145 int currentPosition = position; 146 while (isWhitespace(str.charAt(currentPosition))) { 146 if (currentPosition >= str.length() || currentPosition < 0) 147 return ""; 148 char ch; 149 ch = str.charAt(currentPosition); 150 while (isWhitespace(ch)) { 147 151 whiteSpaces.append(str.charAt(currentPosition)); 148 152 currentPosition--; 153 if (currentPosition < 0) 154 break; 155 ch = str.charAt(currentPosition); 149 156 } 150 157 return whiteSpaces.toString();
Note: See TracChangeset
for help on using the changeset viewer.