Merge branch 'ma/user-manual-markup-update'
[git/git.git] / url.h
CommitLineData
638794cd
JK
1#ifndef URL_H
2#define URL_H
3
ef3ca954
EN
4struct strbuf;
5
55454427
DL
6int is_url(const char *url);
7int is_urlschemechar(int first_flag, int ch);
8char *url_decode(const char *url);
9char *url_decode_mem(const char *url, int len);
e987df5f
MD
10
11/*
12 * Similar to the url_decode_{,mem} methods above, but doesn't assume there
13 * is a scheme followed by a : at the start of the string. Instead, %-sequences
14 * before any : are also parsed.
15 */
16char *url_percent_decode(const char *encoded);
17
55454427
DL
18char *url_decode_parameter_name(const char **query);
19char *url_decode_parameter_value(const char **query);
638794cd 20
55454427
DL
21void end_url_with_slash(struct strbuf *buf, const char *url);
22void str_end_url_with_slash(const char *url, char **dest);
1966d9f3 23
638794cd 24#endif /* URL_H */