Juan Carlos
cbcaf2bbc4
Clean out strutils ( #14859 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-07-01 23:16:50 +02:00
Andreas Rumpf
da29222f86
init checks and 'out' parameters ( #14521 )
...
* 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
2020-06-23 10:53:57 +02:00
Kaushal Modi
bf0e1c696f
Remove the uses of {.procvar.} pragma ( #14359 )
...
This pragma did nothing.
Ref:
- https://github.com/nim-lang/Nim/issues/2172#issuecomment-383276469
- https://github.com/nim-lang/Nim/issues/12975
2020-05-15 23:37:24 +02:00
hlaaftana
3e060cfb0a
=> supports pragmas & names (+ changed behavior) ( #14200 )
...
* => 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
2020-05-03 10:22:49 +02:00
Andreas Rumpf
cc60caedb3
fixes #14054 [backport:1.2] ( #14061 )
...
* fixes #14054
* make tests green again
* more tests are green
* maybe now
2020-04-30 06:48:57 +02:00
Vindaar
d42c5a575d
base parseEnum on a case statement, fixes #14030 ( #14046 )
...
* 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
2020-04-22 09:41:56 +01:00
Clyybber
fb94836bc7
Tiny since cleanup ( #13286 )
2020-01-28 20:02:07 +01:00
hlaaftana
e7744b0909
Rename isNilOrWhitespace to isEmptyOrWhitespace and make it use allCharsInSet ( #13258 )
...
* Rename isNilOrWhitespace to isEmptyOrWhitespace
* Make isEmptyOrWhitespace use allCharsInSet(Whitespace)
2020-01-26 14:02:07 +01:00
Andy Davidoff
bd8f49cbd3
replace some runtime repr in stdlib for gc:arc ( #12716 )
2019-11-25 10:13:30 +01:00
b3liever
0c4d81241a
Version of trimZeros without temp strings ( #12633 )
2019-11-11 12:54:17 +01:00
Andreas Rumpf
3ba3307d61
remove deprecated procs ( #12535 )
2019-11-05 11:05:46 +01:00
Miran
ffa9a7405f
fix #8242 , fix #12586 : fix 'formatFloat' with 'precision = 0' ( #12592 )
...
* 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
2019-11-05 10:31:23 +01:00
Arne Döring
99078d80d7
introduce csize_t instead of fixing csize ( #12497 )
2019-10-31 19:18:12 +01:00
Jjp137
3ad48069d3
Fix word wrapping
2019-10-22 17:59:12 -07:00
Jjp137
93461aee34
Fix many broken links
...
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.
2019-10-22 17:59:12 -07:00
Andreas Rumpf
889b745b2b
Revert "Fixes #12187 ( #12321 )" ( #12447 )
...
This reverts commit 00c31e8766 .
2019-10-18 15:59:22 +02:00
Clyybber
00c31e8766
Fixes #12187 ( #12321 )
...
* Fixes #12187
* Point to fork of compactdict
Since the original repo is now archived / read-only
2019-10-08 14:15:47 +02:00
Ridho Pratama
678775601a
Fixed sizeOf to sizeof ( #12347 )
2019-10-03 19:38:37 +02:00
narimiran
dcf3181bd1
[backport] run nimpretty on string stuff
2019-09-30 13:58:13 +02:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Araq
c94647aeca
styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error
2019-07-10 12:42:41 +02:00
Miran
23e95dc629
[bugfix] fix delete in strutils and sequtils ( #11535 )
2019-06-20 21:04:37 +02:00
narimiran
cf47c2c60c
[other] documentation: deprecation comments are now auto-generated
2019-06-19 14:21:46 +02:00
Charles Blake
6dc6487311
Disambiguate idents now that all 3 rfind's are included in the RTL.
2019-06-15 03:46:21 -04:00
Charles Blake
e7188cdfa8
Add missing ,int to type signature in doc comment references.
2019-06-13 10:20:43 -04:00
Charles Blake
bde899d4f8
Attempt to close https://github.com/nim-lang/Nim/issues/11430
2019-06-12 07:44:56 -04:00
Andreas Rumpf
5eb47f8ed9
fixes #11369 ( #11381 )
2019-06-02 14:24:38 +02:00
Alvydas Vitkauskas
981f95757c
Implement generic fromBin|Oct|Hex in strutils ( #11107 )
...
* 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
2019-05-23 21:34:47 +02:00
Araq
26fc7d465a
strutils.nim: fixes the indentation of formatEng
2019-04-10 15:44:34 +02:00
MrZoraman
c6327e229a
Fix dead sequtils link ( #10960 ) [ci skip]
2019-04-04 07:03:15 +02:00
narimiran
2074ad1416
strutils: document parseEnum [ci skip]
2019-02-25 11:35:37 +01:00
Araq
68ce92d4eb
fixes a critical strutils bug [backport]
2019-02-19 19:37:25 +01:00
Araq
e4a76c6ebf
fixes #6832
2019-02-19 17:17:12 +01:00
narimiran
52a54f5f04
documentation: remove author field [ci skip]
2019-01-17 07:15:40 +01:00
narimiran
be6456f0f4
better docs: strutils
2019-01-16 09:45:51 +01:00
Araq
f7d0e5c1d1
strutils: minor code cleanup
2018-12-19 18:06:13 +01:00
Araq
3f6168b337
removes deprecated T/P types
2018-11-16 13:27:56 +01:00
Araq
56f76c5b08
better implementation for wrapWords
2018-11-08 20:52:22 +01:00
Timothee Cour
e4e19f8288
stripLineEnd aka chomp ( #9623 )
2018-11-05 08:01:31 +01:00
Federico Ceratto
62693457df
Add 'dedent' to documentation index ( #9615 )
2018-11-04 08:36:13 +01:00
Arne Döring
80843373ba
changelog entry
2018-10-31 14:29:40 +01:00
Arne Döring
84db658eb4
fix typo
2018-10-31 10:44:44 +01:00
Arne Döring
e653121633
fixes #9557
2018-10-30 17:13:02 +01:00
Neelesh Chandola
95cc1abdc7
Fixes #9525 ( #9526 )
2018-10-28 14:27:17 +01:00
eqperes
afd9d8dd8d
Some documentation added to strutils ( #9379 )
...
* wip documentation strutils
* some runnableExamples in strutils
* assert -> doAssert
* corrected doc for abbrev; some more runnable examples
* runnableExamples for join
* fix c&p error
* corrections
2018-10-16 17:30:38 +02:00
skilchen
f04c93b5dd
math.round is not needed in strutils ( #9383 )
2018-10-16 09:19:53 +02:00
Federico Ceratto
b62328cb76
Add strip() example ( #8002 )
2018-10-14 11:05:28 +02:00
Andreas Rumpf
152c7d99c3
struils: don't use the deprecated accumulateResult
2018-10-14 10:28:50 +02:00
Andreas Rumpf
7656925140
added new editdistance stdlib module, deprecated strutils.editDistance, refs #6301
2018-10-14 10:26:45 +02:00
Andreas Rumpf
7f81519f41
strutils/unicode: deprecate isLower and friends operating on complete strings; fixes #7963 properly
2018-10-14 09:48:54 +02:00