List<FormatStringChunk> () { myPos = 0; while (myPos < myLiteral.length()) { int next = myLiteral.indexOf('%', myPos); while(next >= 0 && next < myLiteral.length()-1 && myLiteral.charAt(next+1) == '%') { next = myLiteral.indexOf('%', next+2); } if (next < 0) break; if (next > myPos) { myResult.add(new ConstantChunk(myPos, next)); } myPos = next; parseSubstitution(); } if (myPos < myLiteral.length()) { myResult.add(new ConstantChunk(myPos, myLiteral.length())); } return myResult; }