feat(#4752): add tt.is-digit object#5208
Conversation
🚀 Performance AnalysisAll benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information. Click to see the detailed report
✅ Performance gain: |
f21cb75 to
8a808df
Compare
Pure-EO `is-digit` checks that `text` contains only decimal digits, needed as a helper for the pure-EO `sprintf` reimplementation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
8a808df to
03839d1
Compare
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
@yegor256, could you please take a look |
Part of objectionary#4752. Adds a pure-EO `tt.as-ascii` object that reads a single character as its ASCII numeric value (0-255), by widening the character's byte to the eight bytes `i64` expects and reading it back as a number. It is a small helper needed by the pure-EO `sprintf` reimplementation (and shared by the `up-cased`/`low-cased` siblings, which today each carry a private copy). Split into its own PR to keep the change small, mirroring the earlier `tt.is-digit` PR (objectionary#5208). The name follows the `as-...` value family of the core library (`as-bytes`, `as-i64`, `as-number`) and pairs with the existing sibling `tt.is-ascii`. It ships with inline `+>` tests covering the boundaries of the upper-case (`A`/`Z`), lower-case (`a`/`z`) and digit (`0`/`9`) ranges, plus space, punctuation (`!`) and the last printable character (`~`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Part of objectionary#4752. Adds a pure-EO `tt.as-ascii` object that reads a single character as its ASCII numeric value (0-255), by widening the character's byte to the eight bytes `i64` expects and reading it back as a number. It is a small helper needed by the pure-EO `sprintf` reimplementation (and shared by the `up-cased`/`low-cased` siblings, which today each carry a private copy). Split into its own PR to keep the change small, mirroring the earlier `tt.is-digit` PR (objectionary#5208). The name follows the `as-...` value family of the core library (`as-bytes`, `as-i64`, `as-number`) and pairs with the existing sibling `tt.is-ascii`. It ships with inline `+>` tests covering the boundaries of the upper-case (`A`/`Z`), lower-case (`a`/`z`) and digit (`0`/`9`) ranges, plus space, punctuation (`!`) and the last printable character (`~`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@asmirnov-backend Thanks for the contribution! You've earned +16 points following our bonus policy - you received the base 16 points for reviews, plus additional points for your hits-of-code contribution. Please, keep them coming as quality contributions like this help maximize your rewards! Your running score is +16; don't forget to check your Zerocracy account too. |



Part of #4752.
Adds a pure-EO
tt.is-digitobject that checks whethertextcontains only decimal digits. It's a small helper needed by the
pure-EO
sprintfreimplementation (to detect positional argumentindices like
%1$s), split into its own PR to keep the change small.It mirrors the existing sibling objects
tt.is-alpha,tt.is-asciiand
tt.is-alphanumeric: same headers,+alias tt.regex, and inline+>tests.🤖 Generated with Claude Code