Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

GUTF8String GURL::name ( void   ) const

Returns the name part of this URL. For example, if the URL is http://www.lizardtech.com/file201.djvu# then this function will return file201.djvu#. {fname}() will return file 1.djvu# at the same time.

Definition at line 977 of file GURL.cpp.

References is_empty(), GBaseString::length(), and protocol().

Referenced by add_djvu_cgi_argument(), DataPool::connect(), extension(), and fname().

     const_cast<GURL *>(this)->init();
   GUTF8String retval;
     const GUTF8String xurl(url);
     const int protocol_length=protocol(xurl).length();
     const char * ptr, * xslash=(const char *)xurl+protocol_length-1;
     for(ptr=(const char *)xurl+protocol_length;
       *ptr && !is_argument(ptr);ptr++)
       if (*ptr==slash)
     retval=GUTF8String(xslash+1, ptr-xslash-1);
   return retval;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index