Пример #1
0
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;
}
Пример #2
0
bool TOpt::IsAllowedShortName(unsigned char c) {
    return isprint(c) && TStringBuf::npos == ExcludedShortNameChars.find(c);
}