tts/text_reader.cpp: refactor the common match logic into a matched() helper method