fix #7764, endof and next for RepString