From a526209e747642c9dbd8c0cbe9ec2b5247c35d5e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 24 Oct 2012 18:22:45 +0100 Subject: More useful title info for images. --- utils/nsurl.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'utils/nsurl.h') diff --git a/utils/nsurl.h b/utils/nsurl.h index 068d08b8d..b075c42a1 100644 --- a/utils/nsurl.h +++ b/utils/nsurl.h @@ -182,6 +182,20 @@ bool nsurl_has_component(const nsurl *url, nsurl_component part); const char *nsurl_access(const nsurl *url); +/** + * Access a URL's path leaf as a string + * + * \param url NetSurf URL to retrieve a string pointer for. + * \return the required string + * + * The returned string is owned by the NetSurf URL object. It will die + * with the NetSurf URL object. Keep a reference to the URL if you need it. + * + * The returned string has a trailing '\0'. + */ +const char *nsurl_access_leaf(const nsurl *url); + + /** * Find the length of a NetSurf URL object's URL, as returned by nsurl_access * -- cgit v1.2.3