summary refs log tree commit diff stats
path: root/tests/threads/threadex.nim
diff options
context:
space:
mode:
authorZoom <ZoomRmc@users.noreply.github.com>2022-06-07 08:35:06 +0000
committerGitHub <noreply@github.com>2022-06-07 10:35:06 +0200
commitb024a45163ce1a2224ec5891c81cf2cc7d399f11 (patch)
tree4d120b86350fd42f9463dad0c715ec53c6635e58 /tests/threads/threadex.nim
parentd0232f0e5b97b697a640c2f622c7596ce6d10eb5 (diff)
downloadNim-b024a45163ce1a2224ec5891c81cf2cc7d399f11.tar.gz
Fix `find` routines' api to default to `last=-1` (#19761)
This changes the default for the `last` parameter of various `find`
routines from `0` to `-1`. Previous default prevents limiting the search
to the first character. This is a logic error, as full text search was
performed for 2 *valid* values of `last`: `0` and `last.high()`.

Adds an overload for `initSkipTable` which returns a newly initialized
table. This encapsulates every single usage of a `var`-acting original
func in this module.

Co-authored-by: flywind <xzsflywind@gmail.com>
Diffstat (limited to 'tests/threads/threadex.nim')
0 files changed, 0 insertions, 0 deletions
8' href='#n128'>128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204