diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-10-13 14:04:28 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-10-13 14:04:28 +0200 |
| commit | a252f9695d8c95d2eb1aaf7d25e720ac84765be6 (patch) | |
| tree | 1e9ff1506c2632536adf2e5666ebf0efbe81d8aa /src/utils | |
| parent | 059ae6b0713e2be43a1eaa7fbae005a83c4de03d (diff) | |
| download | chawan-a252f9695d8c95d2eb1aaf7d25e720ac84765be6.tar.gz | |
twtstr, toml: misc cleanup
* remove unused DateTime toml type
* add parseIntP for pointer-size int parsing
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/twtstr.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 342ecede..1f43c443 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -273,6 +273,9 @@ func parseOctInt64*(s: openArray[char]): Option[int64] = func parseHexInt64*(s: openArray[char]): Option[int64] = return parseIntImpl[int64, uint64](s, 16) +func parseIntP*(s: openArray[char]): Option[int] = + return parseIntImpl[int, uint](s, 10) + # https://www.w3.org/TR/css-syntax-3/#convert-string-to-number func parseFloat64*(s: openArray[char]): float64 = var sign = 1f64 |