Logo Search packages:      
Sourcecode: djvulibre version File versions

void GURL::set_hash_argument ( const GUTF8String arg  ) 

Inserts the arg# after a separating hash into the URL. The function encodes any illegal character in arg# using {GOS::encode_reserved}().

Definition at line 521 of file GURL.cpp.

References encode_reserved(), and get_string().

{
   const GUTF8String xurl(get_string());

   GUTF8String new_url;
   bool found=false;
   const char * ptr;
   for(ptr=xurl;*ptr;ptr++)
   {
      if (is_argument(ptr))
      {
         if (*ptr!='#')
         {
           break;
         }
         found=true;
      } else if (!found)
      {
         new_url+=*ptr;
      }
   }

   url=new_url+"#"+GURL::encode_reserved(arg)+ptr;
}


Generated by  Doxygen 1.6.0   Back to index