public StringGrabber substring ( int startIdx , int endIndex ) { if ( startIdx < 0 ) { startIdx = 0 ; } if ( endIndex > length ( ) - 1 ) { endIndex = length ( ) - 1 ; } sb = new StringBuilder ( substringInternally ( startIdx , endIndex ) ) ; return StringGrabber . this ; }
returns substring specified with start index and endIndex