diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-01 21:46:12 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-01 21:46:39 +0100 |
commit | e4f960ca74af4a89743bb5266423b13e3d1b6235 (patch) | |
tree | 6afad1045597d38630c520f8a8a215913d090f0c /utils.c | |
parent | 46cf4c79368daa556ed6936999ab05408f61da00 (diff) |
add uh_split_header()
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -199,3 +199,20 @@ bool uh_path_match(const char *prefix, const char *url) return url[len] == '/' || url[len] == 0; } + +char *uh_split_header(char *str) +{ + char *val; + + val = strchr(str, ':'); + if (!val) + return NULL; + + *val = 0; + val++; + + while (isspace(*val)) + val++; + + return val; +} |