borderchar
#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
if (!borderchar(ch))