token: Update String methods to use <invalid> for invalid tokens.