Add function to get at url length.
svn path=/trunk/netsurf/; revision=13003
This commit is contained in:
parent
165cca27b0
commit
642d773e2f
|
@ -1435,6 +1435,15 @@ const char *nsurl_access(const nsurl *url)
|
|||
}
|
||||
|
||||
|
||||
/* exported interface, documented in nsurl.h */
|
||||
size_t nsurl_length(const nsurl *url)
|
||||
{
|
||||
assert(url != NULL);
|
||||
|
||||
return url->length;
|
||||
}
|
||||
|
||||
|
||||
/* exported interface, documented in nsurl.h */
|
||||
nserror nsurl_join(const nsurl *base, const char *rel, nsurl **joined)
|
||||
{
|
||||
|
|
|
@ -182,6 +182,17 @@ bool nsurl_enquire(const nsurl *url, nsurl_component part);
|
|||
const char *nsurl_access(const nsurl *url);
|
||||
|
||||
|
||||
/**
|
||||
* Find the length of a NetSurf URL object's URL, as returned by nsurl_access
|
||||
*
|
||||
* \param url NetSurf URL to find length of.
|
||||
* \return the required string
|
||||
*
|
||||
* The returned length excludes the trailing '\0'.
|
||||
*/
|
||||
size_t nsurl_length(const nsurl *url);
|
||||
|
||||
|
||||
/**
|
||||
* Join a base url to a relative link part, creating a new NetSurf URL object
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue