summaryrefslogtreecommitdiff
path: root/src/gmutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmutil.c')
-rw-r--r--src/gmutil.c9
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
27void 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}