Code example for ParsePosition

Methods: getIndex, setIndex

0
/* 453 */     }while ((len > 0) && (pos.getIndex() < pattern.length()));
/*     */   } 
/*     */  
/*     */   private ParsePosition next(ParsePosition pos)
/*     */   { 
/* 463 */     pos.setIndex(pos.getIndex() + 1);
/* 464 */     return pos;
/*     */   } 
/*     */  
/*     */   private StringBuilder appendQuotedString(String pattern, ParsePosition pos, StringBuilder appendTo, boolean escapingOn)
/*     */   { 
/* 479 */     int start = pos.getIndex();
/* 480 */     char[] c = pattern.toCharArray();
/* 481 */     if ((escapingOn) && (c[start] == '\'')) {
/* 482 */       next(pos);
/* 483 */       return appendTo == null ? null : appendTo.append('\'');
/*     */     } 
/* 485 */     int lastHold = start;
/* 486 */     for (int i = pos.getIndex(); i < pattern.length(); i++) {
/* 487 */       if ((escapingOn) && (pattern.substring(i).startsWith("''"))) {
/* 488 */         appendTo.append(c, lastHold, pos.getIndex() - lastHold).append('\'');