Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fixes #8911 | Andreas Rumpf | 2018-09-16 | 1 | -0/+15 |
| | |||||
* | Fixed 7478: splitLines keepEol option (#8621) | Iván Montes | 2018-08-13 | 1 | -1/+8 |
| | |||||
* | Add parse bin int, fixes #8018 (#8020) | Vindaar | 2018-06-13 | 1 | -1/+48 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clarify `parseHexInt`, `parseOctInt` docstring and exception msgs * add `parseBinInt` based on `parseutil.parseBin` implementation Adds a `parseBinInt`, which parses a binary integer string and returns it as an integer. This is based on the implementation of `parseutil.parseBin`, removing the unnecessary parts. * add tests for all `parse(Hex|Oct|Bin)Int` procs * replace `parse*Int` proc impls by call to parseutil procs Replaces the `parse(Hex|Oct|Bin)Int` procedure implementation by calls to the `parseutil` procs, which receive a mutable argument. Has the main advantage that the empty string as well as a "prefix only" string, e.g. "0x" counts as an invalid integer. Also moves the `parseOctInt` proc further up in the file so that all `parse` procs are below one another. * replace `var L` by `let L` in `parse` procs There's no reason for the usage of `var` here. * add `maxLen` optional arg for `parseutil.parse(Oct|Bin)` Plus small change to test cases. * update changelog about `parse*Int` procs * fix `rejectParse` template in `tstrutils` * make sure only `s.len` chars are parsed, if `maxLen+start` > s.len Fixes a previous bug in `parseHex` (and now affected `parseOct` and `parseBin`), which allowed to set `start + maxLen` to be larger than the strings length. This resulted in an out of bounds access. * move `parse*Int` proc change to breaking changes, add double ` | ||||
* | Add string-to-hex and back conversions | Federico Ceratto | 2017-11-27 | 1 | -0/+18 |
| | | | | Add parseHexStr and toHex and tests. | ||||
* | Update `removeSuffix` implementations to match `removePrefix` (#6636) | Bo Lingen | 2017-10-30 | 1 | -4/+26 |
| | |||||
* | add `strutils.removePrefix` proc (#6473) | Bo Lingen | 2017-10-28 | 1 | -0/+62 |
| | |||||
* | isAlphaNumberic and isDigit improvement + tests (#6579) | Viktor Marosvary | 2017-10-24 | 1 | -0/+19 |
| | | | if we encounter a character that does not satisfy the proc, we return immediately, without continuing to loop over the rest of the chars in the string. | ||||
* | Fix wrong result of countLines() (#6371) | Simon Krauter | 2017-09-15 | 1 | -0/+12 |
| | |||||
* | Improve & optimize strutils 'find' procs (#5196) | Parashurama | 2017-01-11 | 1 | -0/+27 |
| | | | | | * add 'last' argument to 'find' procs in strutils * add 'rfind' proc for looking up set[char] in strutils * use optimised C function 'memchr' when available | ||||
* | Add a unit test that covers issue 3477 | Charles Blake | 2015-11-19 | 1 | -0/+1 |
| | | | | https://github.com/nim-lang/Nim/issues/3477 | ||||
* | Update tests to proposed changes | Zach Aysan | 2015-07-21 | 1 | -16/+39 |
| | |||||
* | Add tests for chomp | Zach Aysan | 2015-07-17 | 1 | -4/+21 |
| | |||||
* | Replaced repeatStr() and repeatChar() with more natural versions. | Hans Raaf | 2015-03-03 | 1 | -2/+8 |
| | |||||
* | Added test for toHex(). | Hans Raaf | 2015-02-18 | 1 | -24/+27 |
| | |||||
* | strutils.rfind via char | dyu | 2014-12-19 | 1 | -0/+4 |
| | |||||
* | new tester; all tests categorized | Araq | 2014-01-13 | 1 | -0/+45 |