[texhax] The last character of a string

Michael Barr barr at math.mcgill.ca
Fri Jan 29 00:25:07 CET 2010


Is there a simple way to find the last character of a string?  Assume the 
string is brace delimited.  What I want to do is add a period unless the 
string already ends in a period, question mark, or exclamation mark, but I 
don't see any way short of going through the string knocking off one 
character at a time.


More information about the texhax mailing list