summary refs log tree commit diff stats
path: root/lib/pure/strutils.nim
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4361 from jyapayne/fix_splitAndreas Rumpf2016-07-021-70/+88
|\ | | | | Fix #4305: Make split proc for set[char] consistent
| * Add transition define for old split behaviorJoey Payne2016-07-011-1/+26
| |
| * Fix #4305: Make split proc for set[char] consistentJoey Payne2016-07-011-70/+63
| |
* | Add useful unicode procs for string manipulationJoey Payne2016-07-011-62/+193
|/ | | | | | | Added: isUpper, isLower, isAlpha, isWhiteSpace, toUpper, toLower, and capitalize Renamed strutils procs that are similar to avoid conflicts
* Fixing isNilOrWhitespace to handle empty/nil.Euan2016-06-241-2/+7
|
* Fixing isNilOrWhitespace for empty/nil strings.Euan2016-06-241-1/+1
| | | | | `isSpace` returns false for an empty string, which is the opposite of this method.
* Adding isNilOrEmpty and isNilOrWhitespaceEuan2016-06-241-1/+22
| | | | | | | | As discussed in #4184, this patch adds `isNilOrEmpty` and `isNilOrWhitespace` to `strutils`. It also modifies the existing `isSpace` proc slightly to exit early rather than looping through all characters in a string.
* moved expandTabs to strmiscAndreas Rumpf2016-06-151-40/+0
|
* Move partition and rpartition to new strmisc moduleJoey Payne2016-06-131-40/+0
| | | | | | This was done because partition is an uncommonly used proc that is still useful in rare cases. There is also a desire to add more procs to this module at a later time.
* Add new procs for string manipulationJoey Payne2016-06-131-5/+301
| | | | | Add center, isTitle, title, partition, rpartition, rsplit, swapCase, translate, and expandTabs
* Added inline pragmas.A. S. Budden2016-06-061-2/+2
|
* Added startsWith/endsWith implementations for character prefix/suffix (fixes ↵A. S. Budden2016-06-061-0/+16
| | | | #4252).
* Merge pull request #4261 from abudden/4197-formatEngAndreas Rumpf2016-06-021-0/+165
|\ | | | | Implemented string formatting functions for engineering format
| * Implemented string formatting functions for engineering format (fixes #4197).A. S. Budden2016-06-021-0/+165
| |
* | Added missing noSideEffect pragmaA. S. Budden2016-06-021-1/+1
|/
* Merge pull request #4250 from abudden/4198-formatSizeAndreas Rumpf2016-06-021-21/+79
|\ | | | | Reimplementation of formatSize to return a more meaningful value
| * Modified trimZeros to modify the passed value.A. S. Budden2016-06-011-15/+14
| |
| * Moved zero trimming into a separate function (code review comment)A. S. Budden2016-06-011-27/+21
| |
| * Reimplementation of formatSize to return a more meaningful value (fixes #4198).A. S. Budden2016-06-011-24/+89
| |
* | make split with strings as separator fasterAndreas Rumpf2016-06-011-1/+6
| |
* | adds strutils.toHex variant that knows about the used integer sizeAndreas Rumpf2016-06-011-0/+4
|/
* Merge branch 'maxsplit' of https://github.com/mjoud/Nim into mjoud-maxsplitAndreas Rumpf2016-05-281-10/+29
|\
| * modified strutils.splitMagnus Jöud2015-10-141-9/+6
| |
| * added tests for strutils.splitMagnus Jöud2015-10-141-0/+6
| |
| * added maxsplit argument to strutils.splitMagnus Jöud2015-10-141-10/+25
| |
* | minor whitespace changeAraq2016-05-101-1/+1
| |
* | Fixes #4037Dominik Picheta2016-04-041-27/+63
| |
* | Add parseUInt and parseBiggestUInt functions to stdlib (parseutils, strutils)Anatoly Galiulin2016-03-301-0/+18
| |
* | Make strutils.join with with generic openarraysdef2016-03-061-11/+15
| |
* | fixes strutils.unescape; refs #3634Andreas Rumpf2016-01-171-5/+5
| |
* | fixed float formatting for jsYuriy Glukhov2015-11-261-24/+39
| |
* | Fix loop index bug in scan for a[s] in b[s..s+len2-1].Charles Blake2015-11-191-1/+1
| | | | | | | | | | | | a, b must both be indexed starting from s after the common prefix "strip" phase. This resolves issue 3477: https://github.com/nim-lang/Nim/issues/3477
* | add {.pop.} for {.push debugger:off.} to balance push/popJamesP2015-10-141-1/+3
|/
* Made strutils string test procs less redundant.Joey Payne2015-10-101-49/+49
|
* Added tests for string test procs.Joey Payne2015-10-101-0/+52
|
* Changed alphanumeric check to "or" instead of "and".Joey Payne2015-10-101-1/+1
|
* Added useful procs to strutils for string testing.Joey Payne2015-10-091-0/+126
| | | | | | | | | | | Added procs: isAlpha isAlphaNumeric isDigit isSpace isUpper isLower
* strutils: wrap too long linesAraq2015-10-061-8/+14
|
* Implement strutils.indentDominik Picheta2015-09-111-0/+18
|
* formatFloat takes an optional decimalSep parameterAraq2015-09-011-10/+17
|
* Add extern pragmaZach Aysan2015-07-211-3/+5
|
* Add docsZach Aysan2015-07-211-0/+27
|
* Switch to removeSuffix name and modify the string in placeZach Aysan2015-07-211-46/+27
|
* Create Ruby-like chomp proc to allow for easy string ending removalZach Aysan2015-07-171-1/+46
|
* renamed writeln to writeLine in libpatrick dw2015-06-191-6/+6
|
* lib/pure/p-t - Dropped 'T' from typespdw2015-06-041-1/+2
|
* Add arbitrary char support to the strutils proc. Issue #2626msmith4912015-04-301-7/+13
|
* fixes #2517Araq2015-04-251-1/+2
|
* Turn some test outputs into actual testsOleh Prypin2015-04-211-3/+7
|
* Don't run non-test code when defined(testing)Oleh Prypin2015-04-211-4/+6
|