diff options
author | bptato <nincsnevem662@gmail.com> | 2023-12-01 21:24:34 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-12-10 15:08:38 +0100 |
commit | e5a0fd6af4296f76987530a9566eb019307fa8bf (patch) | |
tree | 7002cc8d9772cd2bc4e78d7785a524eae791f5aa /src/utils/twtstr.nim | |
parent | 3cadec11d0d8758c1a396ce77a61d5adab5bc6c1 (diff) | |
download | chawan-e5a0fd6af4296f76987530a9566eb019307fa8bf.tar.gz |
config: better path handling; fix array parsing bug
* Paths are now parsed through an unified code path with some useful additions like environment variable substitution. * Fix a bug in parseConfigValue where strings would be appended to existing arrays (and not override them). * Fix beforeLast calling afterLast for some reason. * Add a default CGI directory.
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 8372e588..9e40b920 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -237,7 +237,7 @@ func beforeLast*(s: string, c: set[char], n = 1): string = return s.substr(0, i) return s -func beforeLast*(s: string, c: char, n = 1): string = s.afterLast({c}, n) +func beforeLast*(s: string, c: char, n = 1): string = s.beforeLast({c}, n) proc c_sprintf(buf, fm: cstring): cint {.header: "<stdio.h>", importc: "sprintf", varargs} |