void get_command_line_as_single_string(dynamic_string& cmd_line, int argc, char *argv[])
   {
      argc, argv;
#if false && CRNLIB_USE_WIN32_API // THIS DOES NOT WORK PROPERLY, ADDING TOO MANY QUOTES, SO WE IGNORE IT.
      cmd_line.set(GetCommandLineA());
#else
      cmd_line.clear();
      for (int i = 0; i < argc; i++)
      {
         dynamic_string tmp(argv[i]);
         if ((tmp.front() != '"') && (tmp.front() != '-') && (tmp.front() != '@')) 
            tmp = "\"" + tmp + "\"";
         if (cmd_line.get_len())
            cmd_line += " ";
         cmd_line += tmp;
      }
#endif
   }
   void get_command_line(dynamic_string& cmd_line, int argc, char *argv[])
   {
      argc, argv;
#if CRNLIB_USE_WIN32_API
      cmd_line.set(GetCommandLineA());
#else
      cmd_line.clear();
      for (int i = 0; i < argc; i++)
      {
         dynamic_string tmp(argv[i]);
         if ((tmp.front() != '"') && (tmp.front() != '-') && (tmp.front() != '@'))
            tmp = "\"" + tmp + "\"";
         if (cmd_line.get_len())
            cmd_line += " ";
         cmd_line += tmp;
      }
#endif
   }
    bool ktx_texture::get_key_value_as_string(const char *pKey, dynamic_string &str) const
    {
        const uint8_vec *p = find_key(pKey);
        if (!p)
        {
            str.clear();
            return false;
        }

        const uint32_t ofs = vogl_strlen(pKey) + 1;
        const uint8_t *pValue = p->get_ptr() + ofs;
        const uint32_t n = p->size() - ofs;

        uint32_t i;
        for (i = 0; i < n; i++)
            if (!pValue[i])
                break;

        str.set_from_buf(pValue, i);
        return true;
    }