question: public UndoableEdit insertString ( int where , String str ) throws BadLocationException { if ( where > length ( ) || where < 0 ) { throw new BadLocationException ( "Invalid insert" , length ( ) ) ; } char [ ] chars = str . toCharArray ( ) ; replace ( where , 0 , chars , chars . length ) ; return new InsertUndo ( where , str . length ( ) ) ; }
target:  Inserts a string into the content.