Validate tinyurl

This commit is contained in:
James Booth
2012-07-29 01:12:39 +01:00
parent 45e2415b71
commit a16a7171f2
3 changed files with 23 additions and 26 deletions

View File

@@ -41,6 +41,13 @@ tinyurl_init(void)
curl_global_init(CURL_GLOBAL_ALL);
}
gboolean
tinyurl_valid(char *url)
{
return (g_str_has_prefix(url, "http://") ||
g_str_has_prefix(url, "https://"));
}
char *
tinyurl_get(char *url)
{