diff options
Diffstat (limited to 'src/gmutil.c')
-rw-r--r-- | src/gmutil.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gmutil.c b/src/gmutil.c index 07861523..ce50f015 100644 --- a/src/gmutil.c +++ b/src/gmutil.c | |||
@@ -23,3 +23,12 @@ void init_Url(iUrl *d, const iString *text) { | |||
23 | } | 23 | } |
24 | iRelease(pattern); | 24 | iRelease(pattern); |
25 | } | 25 | } |
26 | |||
27 | void urlEncodeSpaces_String(iString *d) { | ||
28 | for (;;) { | ||
29 | const size_t pos = indexOfCStr_String(d, " "); | ||
30 | if (pos == iInvalidPos) break; | ||
31 | remove_Block(&d->chars, pos, 1); | ||
32 | insertData_Block(&d->chars, pos, "%20", 3); | ||
33 | } | ||
34 | } | ||