private StringGrabber replaceCaseTo(int startPos, int endPos, ECase toCase) {

		StringBuilder sbRange = new StringBuilder();

		try {
			for (int i = startPos; i < endPos; i++) {
				sbRange.append(String.valueOf(sb.charAt(i)));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		final String caseConvertedRangeStr;

		if (ECase.LOWER == toCase) {
			caseConvertedRangeStr = sbRange.toString().toLowerCase();
		} else {
			caseConvertedRangeStr = sbRange.toString().toUpperCase();
		}
		try {
			sb.replace(startPos, endPos, caseConvertedRangeStr);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return StringGrabber.this;
	}
private StringGrabber replaceCaseTo ( int startPos , int endPos , ECase toCase ) { StringBuilder sbRange = new StringBuilder ( ) ; try { for ( int i = startPos ; i < endPos ; i ++ ) { sbRange . append ( String . valueOf ( sb . charAt ( i ) ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } final String caseConvertedRangeStr ; if ( ECase . LOWER == toCase ) { caseConvertedRangeStr = sbRange . toString ( ) . toLowerCase ( ) ; } else { caseConvertedRangeStr = sbRange . toString ( ) . toUpperCase ( ) ; } try { sb . replace ( startPos , endPos , caseConvertedRangeStr ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return StringGrabber . this ; }
convert string in the specified position(range) to specified case

@param sb

@param startPos

@param endPos