src/ccutil/unicharset.cpp
std::string UNICHARSET::debug_str(UNICHAR_ID id) const {
  if (id == INVALID_UNICHAR_ID) {
    return std::string(id_to_unichar(id));
  }
  const CHAR_FRAGMENT *fragment = this->get_fragment(id);
  if (fragment) {
    return fragment->to_string();
  }
  const char *str = id_to_unichar(id);
  std::string result = debug_utf8_str(str);
  // Append a for lower alpha, A for upper alpha, and x if alpha but neither.
  if (get_isalpha(id)) {
    if (get_islower(id)) {
      result += "a";
    } else if (get_isupper(id)) {
      result += "A";
    } else {
      result += "x";
    }
  }
  // Append 0 if a digit.
  if (get_isdigit(id)) {
    result += "0";
  }
  // Append p is a punctuation symbol.
  if (get_ispunctuation(id)) {
    result += "p";
  }
  return result;
}
// Return a string containing debug information on the unichar, including
// the id_to_unichar, its hex unicodes and the properties.
Return a string containing debug information on the unichar, including
the id_to_unichar, its hex unicodes and the properties.
Return a string containing debug information on the unichar including the id_to_unichar its hex unicodes and the properties .
std::string UNICHARSET::debug_str(UNICHAR_ID id) const {
  if (id == INVALID_UNICHAR_ID) {
    return std::string(id_to_unichar(id));
  }
  const CHAR_FRAGMENT *fragment = this->get_fragment(id);
  if (fragment) {
    return fragment->to_string();
  }
  const char *str = id_to_unichar(id);
  std::string result = debug_utf8_str(str);
  if (get_isalpha(id)) {
    if (get_islower(id)) {
      result += "a";
    } else if (get_isupper(id)) {
      result += "A";
    } else {
      result += "x";
    }
  }
  if (get_isdigit(id)) {
    result += "0";
  }
  if (get_ispunctuation(id)) {
    result += "p";
  }
  return result;
}
std :: string UNICHARSET :: debug_str ( UNICHAR_ID id ) const { if ( id == INVALID_UNICHAR_ID ) { return std :: string ( id_to_unichar ( id ) ) ; } const CHAR_FRAGMENT * fragment = this -> get_fragment ( id ) ; if ( fragment ) { return fragment -> to_string ( ) ; } const char * str = id_to_unichar ( id ) ; std :: string result = debug_utf8_str ( str ) ; if ( get_isalpha ( id ) ) { if ( get_islower ( id ) ) { result += " " ; } else if ( get_isupper ( id ) ) { result += " " ; } else { result += " " ; } } if ( get_isdigit ( id ) ) { result += " " ; } if ( get_ispunctuation ( id ) ) { result += " " ; } return result ; }
Return a string containing debug information on the unichar, including
the id_to_unichar, its hex unicodes and the properties.
Return a string containing debug information on the unichar including the id_to_unichar its hex unicodes and the properties .
// Append a for lower alpha, A for upper alpha, and x if alpha but neither. // Append 0 if a digit. // Append p is a punctuation symbol.