summary refs log tree commit diff stats
path: root/tests/js/tstdlib_various.nim
Commit message (Collapse)AuthorAgeFilesLines
* `strutils.split/rsplit` now return src on an empty sep (#22136)Zoom2023-06-211-6/+1
| | | | | | | | | | | | | | | This is a rebase of an earlier rejected PR. Following the discussion around it, this commit provides a valid output for and edge case of an empty separator for `split` and `rsplit` routines. The empty separator is interpreted as "split by no separators" and the initial string is returned. This is consistent with the behaviour of the `set[char]` version of `split`/`rsplit` routines and unifies them all. Compared to a commit merged earlier, this one has a benefit of not using assertions that will be removed in release builds and thus still not preventing possible infinite loops (which was the earlier behaviour for this edge case for separator of type `string`). Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #16993, #18054, #17835 runnableExamples now works with templates and ↵Timothee Cour2021-06-021-1/+1
| | | | nested templates (#18082)
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-311-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * support strutils * more * better * Call len once per string/cstring * Change var to let * Compare ternary on first char * More appropriate param name * fix * better * one test * impl * more efficient * minor Co-authored-by: Clyybber <darkmine956@gmail.com>
* StringStream & more stdlib modules support for JS/NimScript (#14095)hlaaftana2020-04-281-0/+194
* StringStream & more stdlib modules support for JS/NimScript * change back pegs test in line with #14134