chore: reuse IsDigit logic from unicode

Credit to Rob Thornton for pointing this out.