| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Its doc used to render wrongly where `>` is considered as quote block:
![image](https://github.com/nim-lang/Nim/assets/97860435/4aeda257-3231-42a5-9dd9-0052950a160e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
where sizeof(int) < 4 (#23433)
Fixes an issue that comes up when using strutils.`%` or any other
strutils/strformat feature that uses the unicode lookup tables behind
the scenes, on systems where ints are than 32-bit wide.
Tested with:
```bash
./koch test cat lib
```
Refer to the discussion in #23125.
|
|
|
|
|
|
|
| |
Fixes an issue where importing the `strutils` module, or any other
importing the `strutils` module, ends up with a compile time error on
platforms where ints are less then 32-bit wide.
The fix follows the suggestions made in #23125.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixed version check logic [backport]
* add ciphersuites
* debug nimble
* fixes returns omission
* finally
* remove debug message
* add ciphersuites
---------
Co-authored-by: Araq <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added openarray[char] overloads to std/unicode
Call substr instead of index slice inside unicode
Added substr overload for openarray for parity with string functionality
Made style checker happies and fixed overloads for substr
* Added update to changelog [skip ci]
* Inline unicode string operations
* Moved substr overload to unicode
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
| |
* fixes #18858 [backport]
* ensure async tests work with --experimental:strictEffects [backport]
* ensure async tests work with --experimental:strictEffects [backport]
|
|
|
|
|
| |
* fixes #17768 [backport:1.4]
* tiny
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix unicode.split with seperators examples
https://nim-lang.org/docs/unicode.html#split.i%2Cstring%2CRune%2Cint didn't work with the set constructor `{}` so replaced it with a string that's converted to an openArray compatible type containing `Rune`s.
* Add runnableExamples to unicode.split
* Add runnableExamples to split with single separator too
* Simplify runnableExamples unicode.split
* Improve the rest of the runnableExamples with the simplified code
* Simplify runnableExamples of unicode.split even more
* Formatted unicode.split example
* Update lib/pure/unicode.nim
Co-authored-by: zetashift <rishi2@laptop.localdomain>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
|
|
|
|
|
| |
* Fix broken links in docs
* Fix rand HSlice links
|
|
|
|
|
|
|
|
|
| |
* move tests to testament
* minor
* fix random
* disable test random
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* update to the latest Jester
* remove deprecated procs from some stdlib modules
* 'criterion' is not maintained anymore and relies on obsolete stuff
|
|
|
|
|
|
|
| |
This pragma did nothing.
Ref:
- https://github.com/nim-lang/Nim/issues/2172#issuecomment-383276469
- https://github.com/nim-lang/Nim/issues/12975
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(#13629)
* unicode.split: Fix the splitting when a Rune separator is used [backport]
- Fixes https://github.com/nim-lang/Nim/issues/13628
- Ref https://irclogs.nim-lang.org/11-03-2020.html#20:01:34
* unicode.split: Remove the sepLen based logic.. resulted in wrong jumps
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ensure capitalize doesn't take an inferred sink parameter
* sink parameter inference: first version, for now disabled. Changed that sink parameters can be consumed multiple times in order to adhere to our spec.
* sink inference can now be disabled with .nosinks; sometimes for proc type interop this is required
* fixes yet another critical DFA bug
* better implementation that also understands if expressions etc
* document sink parameter inference and allow for global disabling
|
|
|
|
|
| |
This fixes some tiny issues with using Nim on 16-bit platforms. Not
entirely sure why the AVR chip I was compiling for with "cpu = avr" was
detected as 16-bit, but that's probably another issue..
|
| |
|
|
|
|
| |
https://github.com/nim-lang/RFCs/issues/151 (#12072)
|
| |
|
| |
|
|
|
|
| |
--styleCheck:error
|
|
|
|
|
|
|
|
|
|
|
| |
* right shift is now by default sign preserving
* fix hashString and semfold
* enable arithmetic shift right globally for CI
* fix typo
* remove xxx
* use oldShiftRight as flag
* apply feedback
* add changelog entry
|
|
|
|
| |
Some Unicode characters don't have the same byte length
in their upper- and lower-case variants.
|
|
|
|
|
|
|
|
|
|
| |
* update unicode.nim
* create a script to create the needed unicode data
* make unicode.nim compatible with Unicode v12.0.0
* slightly improve unicode.nim documentation (fixes #4795)
* more documentation
|
|
|
|
|
|
|
|
| |
* as instructed in #2353, provides a short description why
there are no specialized procs for seq[Rune]
* adds several examples to better explain what some functions do
* small fixes (double backticks, add missing dots, etc.)
* use `rune` instead of "unicode characer"
|
|
|
|
|
| |
* fixes #9800
* add tests for #9800
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
strings; fixes #7963 properly
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The other variants are isLower, isUpperAscii and isLowerAscii
Fixes https://github.com/nim-lang/Nim/issues/7963.
This commit changes the behavior and signatures of:
- isUpper, isLower in the unicode module
- isUpperAscii, isLowerAscii in the strutils module
A second mandatory parameter skipNonAlpha is added to these 4 procs.
(This change affects only for the case where the input is a *string*.)
---
With skipNonAlpha set to true, the behavior mimics the Python isupper and
islower behavior i.e. non-alphabetic chars/runes are ignored when checking if
the string is upper-case or lower-case.
Before this commit:
doAssert(not isUpper("A B"))
After this commit:
doAssert(not isUpper("A B", false)) <-- old behavior
doAssert isUpper("A B", true)
Below two are equivalent:
isUpper("A B", true)
isAlpha("A B") and isUpper("A B", false)
.. and the similar for other 3 procs.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Added: isUpper, isLower, isAlpha, isWhiteSpace, toUpper,
toLower, and capitalize
Renamed strutils procs that are similar to avoid conflicts
|
|
|
|
|
| |
Add center, isTitle, title, partition, rpartition, rsplit, swapCase,
translate, and expandTabs
|
|
|
|
|
|
| |
I hope this also shows that there are use cases. I still think the user
should get warned about performance issues with those procs, which I
added to the doc comments.
|
|
|
|
|
| |
This is work in progress. I added an unicode substring. Tried to handle
edgecases more consistent too.
|
|
|
|
|
| |
It can't be perfect but at least one can index on rune position
efficiently.
|
| |
|
|
|
| |
Make unicode.validateUtf8() check for overlong ascii representations, which are 2 bytes long and start with c0 or c1.
|