Top "Integer" questions

Common datatype in many programming languages for representing a whole number.

How to get the separate digits of an int number?

I have numbers like 1100, 1002, 1022 etc. I would like to have the individual digits, for example for the first number 1100 I …

java integer modulo
How to cast an Object to an int

How can I cast an Object to an int in java?

java object casting integer
How can I check if a string represents an int, without using try/except?

Is there any way to tell whether a string represents an integer (e.g., '3', '-17' but not …

python string integer
Way to get number of digits in an int?

Is there a neater way for getting the number of digits in an int than this method? int numDigits = String.…

java integer
Converting a string to an integer on Android

How do I convert a string into an integer? I have a textbox I have the user enter a number …

java android string integer android-edittext
Convert floats to ints in Pandas?

I've been working with data imported from a CSV. Pandas changed some columns to float, so now the numbers in …

python pandas floating-point integer dataset
How can I convert a character to a integer in Python, and viceversa?

I want to get, given a character, its ASCII value. For example, for the character a, I want to get 97, …

python integer char type-conversion
Extract a single (unsigned) integer from a string

I want to extract the digits from a string that contains numbers and letters like: "In My Cart : 11 items" I …

php string integer text-extraction
Declaring an unsigned int in Java

Is there a way to declare an unsigned int in Java? Or the question may be framed as this as …

java integer unsigned
Converting characters to integers in Java

Can someone please explain to me what is going on here: char c = '+'; int i = (int)c; System.…

java integer type-conversion character primitive