summary refs log tree commit diff stats
path: root/lib/pure/strutils.nim
Commit message (Collapse)AuthorAgeFilesLines
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* make cstrutils work in VM (#16590)flywind2021-01-051-12/+3
| | | | | * make cstrutils work in VM * more
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-311-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* strip minor improvement (#16444)flywind2020-12-231-1/+1
| | | | | | | * strip minor improvement * add more tests * Update tests/stdlib/tstrutils.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* make the docs of strutils a bit better (#16368)flywind2020-12-171-153/+150
|
* strutils.nim: Use `func` everywhere (#16281)ee72020-12-071-325/+294
| | | | | | | | | | | | | * strutils.nim: procs with {.noSideEffect.} -> func * strutils.nim: procs without {.noSideEffect.} -> func * strutils.nim: proc -> func for links * strutils.nim: proc -> func in doc comments * test: add strutils to strictFuncs test * test: proc -> func in errmsg test
* use funcs and fix links in strutils (#16277)flywind2020-12-071-14/+8
| | | | | * use funcs and inline in strutils * use funcs
* toXXAscii use xor op, saving 30%~50% time (#16193)Bung2020-11-301-2/+2
| | | | | | | | | | | | * toXXAscii use xor op, saving 30%~50% time * Update lib/pure/strutils.nim Co-authored-by: hlaaftana <10591326+hlaaftana@users.noreply.github.com> * Update lib/pure/strutils.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: hlaaftana <10591326+hlaaftana@users.noreply.github.com>
* move tests to testament (#16101)flywind2020-11-241-217/+0
| | | | | | | | | * move tests to testament * minor * fix random * disable test random
* Docs(strutils): Fix broken links (#15912)ee72020-11-111-9/+10
| | | | The `dedent` and `unindent` links were introduced by commit d67c5cb75171 (#15264).
* EnumUtils, speed up findStr in compiler (#15777)cooldome2020-11-031-58/+3
| | | | | | | | * add parseEnumRange * fix runnable example * update changelog * use parseEnumRange in compiler * reorganise code * add changelog, make single normalizer argument
* simplify toHex (#15821)Timothee Cour2020-11-021-29/+2
|
* promote `collect` macro as a map+filter replacement (#15788)Miran2020-10-301-1/+2
| | | | | * promote `collect` macro as a map+filter replacement * Update lib/pure/collections/sequtils.nim
* fix `toHex` - make it work with int literals (#15770)Miran2020-10-301-0/+12
|
* various documentation fixes [backport] (#15422)Miran2020-09-291-1/+1
|
* Add strutils.indentation and make unindent use it (#15264)Clyybber2020-09-221-11/+36
| | | | | | | | | | | | | | | | | | | | | | | * Add strutils.indentation and make unindent use it * Code style * Fix bootstrapping * Improve wording * Fix test * Introduce without breaking change * Fix * Reduce diff * Fix docs link * Add since annotation * Update changelog
* Fixed undeclared nimIdentNormalize compilation error in parseEnum (#15343)Yuriy Glukhov2020-09-161-2/+1
|
* fix #15257, `toHex` couldn't handle large uint64 (#15261) [backport:1.2]Miran2020-09-041-12/+31
|
* Fix #11352 strutil.insertSep() fails on negative numbers (#15087)Bung2020-07-281-6/+17
| | | | | | | | | | | | | | | | | | | * fix #11352 strutil.insertSep handle negtive number * test for #11352 * optimize * not parts string var * Update lib/pure/strutils.nim Thanks! Co-authored-by: alaviss <leorize+oss@disroot.org> * need to be countdown Co-authored-by: alaviss <leorize+oss@disroot.org>
* Clean out strutils (#14859)Juan Carlos2020-07-011-5/+0
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-231-5/+17
| | | | | | | | | | | * I don't care about observable stores * enforce explicit initializations * cleaner code for the stdlib * stdlib: use explicit initializations * make tests green * algorithm.nim: set result explicitly * remove out parameters and bring the PR into a mergable state * updated the changelog
* Remove the uses of {.procvar.} pragma (#14359)Kaushal Modi2020-05-151-24/+24
| | | | | | | This pragma did nothing. Ref: - https://github.com/nim-lang/Nim/issues/2172#issuecomment-383276469 - https://github.com/nim-lang/Nim/issues/12975
* => supports pragmas & names (+ changed behavior) (#14200)hlaaftana2020-05-031-1/+1
| | | | | | | | | | * => supports pragmas & names (+ changed behavior) (x, y: int) is now parsed as (x: int, y: int) instead of (x: auto, y: int) inside => and ->. * fix pragma check * fixes, use since & LHS of -> supports pragmas
* fixes #14054 [backport:1.2] (#14061)Andreas Rumpf2020-04-301-5/+2
| | | | | | | | | * fixes #14054 * make tests green again * more tests are green * maybe now
* base `parseEnum` on a case statement, fixes #14030 (#14046)Vindaar2020-04-221-10/+83
| | | | | | | | | | | | | | | | | | | | * base `parseEnum` on a case statement, fixes #14030 * apply simplifactions / clean up, remove `norm` node, use strVal * export `normalize` in json.nim * cmp using nimIdentNormalize, error at CT if ambiguous enum found `nimIdentNormalize` provided by @cooldome. We track all names of the branches we have created so far and error if a duplicate is found. Dummy change to make github react... * fix docstring of `nimIdentNormalize` * make `typ` arg `typedesc`, add lineinfo, call norm. only once
* Tiny since cleanup (#13286)Clyybber2020-01-281-1/+1
|
* Rename isNilOrWhitespace to isEmptyOrWhitespace and make it use ↵hlaaftana2020-01-261-10/+13
| | | | | | | | allCharsInSet (#13258) * Rename isNilOrWhitespace to isEmptyOrWhitespace * Make isEmptyOrWhitespace use allCharsInSet(Whitespace)
* replace some runtime repr in stdlib for gc:arc (#12716)Andy Davidoff2019-11-251-1/+2
|
* Version of trimZeros without temp strings (#12633)b3liever2019-11-111-13/+11
|
* remove deprecated procs (#12535)Andreas Rumpf2019-11-051-278/+0
|
* fix #8242, fix #12586: fix 'formatFloat' with 'precision = 0' (#12592)Miran2019-11-051-14/+6
| | | | | | | | | | | | | | * fix #8242, fix #12586: fix 'formatFloat' with 'precision = 0' 'formatFloat' with 'precision = 0' now gives the same result (a number without a decimal point) in all backends. This is compatible with Python's formatters, too. * fix failing tests * add changelog entry * add version switch
* introduce csize_t instead of fixing csize (#12497)Arne Döring2019-10-311-2/+2
|
* Fix word wrappingJjp1372019-10-221-5/+6
|
* Fix many broken linksJjp1372019-10-221-25/+25
| | | | | | Note that contrary to what docgen.rst currently says, the ids have to match exactly or else most web browsers will not jump to the intended symbol.
* Revert "Fixes #12187 (#12321)" (#12447)Andreas Rumpf2019-10-181-1/+1
| | | This reverts commit 00c31e87660d9db813871f5aa23661bf6b9bbdcb.
* Fixes #12187 (#12321)Clyybber2019-10-081-1/+1
| | | | | | * Fixes #12187 * Point to fork of compactdict Since the original repo is now archived / read-only
* Fixed sizeOf to sizeof (#12347)Ridho Pratama2019-10-031-2/+2
|
* [backport] run nimpretty on string stuffnarimiran2019-09-301-90/+108
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-5/+5
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-14/+14
| | | | --styleCheck:error
* [bugfix] fix `delete` in strutils and sequtils (#11535)Miran2019-06-201-1/+4
|
* [other] documentation: deprecation comments are now auto-generatednarimiran2019-06-191-18/+0
|
* Disambiguate idents now that all 3 rfind's are included in the RTL.Charles Blake2019-06-151-3/+3
|
* Add missing ,int to type signature in doc comment references.Charles Blake2019-06-131-3/+3
|
* Attempt to close https://github.com/nim-lang/Nim/issues/11430Charles Blake2019-06-121-16/+36
|
* fixes #11369 (#11381)Andreas Rumpf2019-06-021-10/+10
|
* Implement generic fromBin|Oct|Hex in strutils (#11107)Alvydas Vitkauskas2019-05-231-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | * make parsutils.parseBin generic and improve runnableExamples * reimplement parseBin/Oct/Hex and improve runnableExamples * update changelog.md file with parseBin/Oct/Hex and fix a typo * delete template and code parseBin|Oct|Hex separately * split definitions between int and other SomeInteger * make parseBin|Oct|Hex generic and remove rtl pragmas * remove pragma inline from praseBin|Oct|Hex * implement families of parse(Bin|Oct|Hex)Int[xx] * fix typo [skip ci] * implement generic fromBin|Oct|Hex * make runnableExamples shorter
* strutils.nim: fixes the indentation of formatEngAraq2019-04-101-5/+5
|
* Fix dead sequtils link (#10960) [ci skip]MrZoraman2019-04-041-1/+1
|
* strutils: document `parseEnum` [ci skip]narimiran2019-02-251-0/+23
|