subroutine to replace a ' with &apos