public IStringBuffer deleteCharAt ( int idx ) { if ( idx < 0 ) throw new IndexOutOfBoundsException ( "idx < 0" ) ; if ( idx >= count ) throw new IndexOutOfBoundsException ( "idx >= buffer.length" ) ; //here we got a bug for j < count //change over it to count - 1 //thanks for the feedback of xuyijun@gmail.com //@date 2013-08-22 for ( int j = idx ; j < count - 1 ; j ++ ) { buff [ j ] = buff [ j + 1 ] ; } count -- ; return this ; }
delete the char at the specified position