src/string_tools.cc
bool vcard::is_key(const std::string& key, const std::string& expected)
{
  auto ikey = key.begin();
  for (auto iexp = expected.begin();
       iexp != expected.end();
       iexp++, ikey++)
  {
    if (ikey == key.end()) return false;
    if (std::toupper(*iexp) != std::toupper(*ikey)) return false;
  }

  if (ikey != key.end() &&
      *ikey != ':' &&
      *ikey != ';') {
    return false;
  }

  return true;
}
// check if vcard key math expected one. (regardless case and attribute)
check if vcard key math expected one. (regardless case and attribute)
check if vcard key math expected one . ( regardless case and attribute )
bool vcard::is_key(const std::string& key, const std::string& expected)
{
  auto ikey = key.begin();
  for (auto iexp = expected.begin();
       iexp != expected.end();
       iexp++, ikey++)
  {
    if (ikey == key.end()) return false;
    if (std::toupper(*iexp) != std::toupper(*ikey)) return false;
  }
  if (ikey != key.end() &&
      *ikey != ':' &&
      *ikey != ';') {
    return false;
  }
  return true;
}
bool vcard :: is_key ( const std :: string & key , const std :: string & expected ) { auto ikey = key . begin ( ) ; for ( auto iexp = expected . begin ( ) ; iexp != expected . end ( ) ; iexp ++ , ikey ++ ) { if ( ikey == key . end ( ) ) return false ; if ( std :: toupper ( * iexp ) != std :: toupper ( * ikey ) ) return false ; } if ( ikey != key . end ( ) && * ikey != ' ' && * ikey != ' ' ) { return false ; } return true ; }
check if vcard key math expected one.
check if vcard key math expected one .