bool TOpt::IsAllowedLongName(const Stroka& name, unsigned char* out) { for (size_t i = 0; i != name.size(); ++i) { const unsigned char c = name[i]; if (!isprint(c) || TStringBuf::npos != ExcludedLongNameChars.find(c)) { if (NULL != out) *out = c; return false; } } return true; }
bool TOpt::IsAllowedShortName(unsigned char c) { return isprint(c) && TStringBuf::npos == ExcludedShortNameChars.find(c); }