Top "Digits" questions

Questions dealing with getting, manipulating, or changing the digits of numbers

how can i tell if a string contains ONLY digits and spaces in python using regex

I'm trying to write some script in python (using regex) and I have the following problem: I need to make …

python regex numbers spaces digits
kable displays different number of digits in each column

I am using kable with the knit to Word functionality at work. I find that I often have simple tables …

r knitr digits
How to extract a number into digits using R?

Suppose I have a number: 4321 and I want to extract it into digits: 4, 3, 2, 1 How do I do this?

r numbers extract digits
How to put numbers of an integer in a vector in C++

If a user enters an integer like 4210 for example, how can I put each number of that integer in a …

c++ vector integer digits
Fastest way to find the largest power of 10 smaller than x

Is there any fast way to find the largest power of 10 smaller than a given number? I'm using this algorithm, …

algorithm language-agnostic base digits
How do I split an integer into individual digits?

I'm writing a function that requires the individual digits of a larger integer to perform operations on. I've tried the …

rust digits