Zoom
b024a45163
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 >
2022-06-07 10:35:06 +02:00
flywind
33bfe5b12c
fix parseEnum cannot parse enum with const fields ( #19466 )
...
fix #19463
2022-02-04 13:47:03 +01:00
Tomasz Kramkowski
ee703c5db4
Fix nimIdentNormalize, fixes #19067 ( #19068 )
...
* Make nimIdentNormalize return "" when passed ""; fixes #19067
Fixes #19067
* Add tests for nimIdentNormalize
2021-10-29 11:39:41 +02:00
Timothee Cour
adba5eb45e
deprecate strutils.delete and add an overload with saner semantics consistent with sequtils.delete; follows #18487 ( #18510 )
2021-07-18 11:10:08 +02:00
n5m
4ee6eddad4
add string-string tests for find and rfind ( #18137 )
...
* add string-string tests for find and rfind
* remove duplicate test cases
* remove more redundant test cases
2021-06-02 16:19:30 +02:00
n5m
064fe18de6
improve fast returns of find and rfind ( #18127 )
2021-05-31 11:20:15 +02:00
Timothee Cour
d19e4310dc
std/hashes: hash(ref|ptr|pointer) + other improvements ( #17731 )
2021-04-16 14:21:26 +02:00
flywind
6d442a40a6
use doAssert in tests ( #16486 )
2020-12-28 14:13:21 +01:00
flywind
417c2509c4
strip minor improvement ( #16444 )
...
* strip minor improvement
* add more tests
* Update tests/stdlib/tstrutils.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2020-12-23 11:57:48 +01:00
Timothee Cour
9ede956662
improve tstrutils: test c, cpp, js, vm; cleanups ( #16357 )
...
* renamed: tests/stdlib/tstrutil.nim -> tests/stdlib/tstrutils.nim
* improve test
* enable tstrutils for js, vm
2020-12-15 14:55:41 +01:00