About 52 results
Open links in new tab
  1. How do I convert a String to an int in Java? - Stack Overflow

    Integer.valueOf produces an Integer object and all other methods a primitive int. The last two methods are from commons-lang3 and a big article about converting here.

  2. How can I convert a string to an integer in JavaScript?

    In absence of OP's clarification, this question could be interpreted in the sense of converting any string to a number, i.e. turning "dog" into a number (which of course can be done).

  3. How do I parse a string to a float or int? - Stack Overflow

    Dec 19, 2008 · For the reverse, see Convert integer to string in Python and Converting a float to a string without rounding it. Please instead use How can I read inputs as numbers? to close duplicate …

  4. Java: NumberFormatException in converting string to integer

    May 17, 2012 · I want to retrieve value from textbox and convert it to integer. I wrote the following code but it throws a NumberFormatException. String nop = no_of_people.getText().toString(); …

  5. How to convert a string to integer in C? - Stack Overflow

    Aug 11, 2011 · 348 I am trying to find out if there is an alternative way of converting string to integer in C. I regularly pattern the following in my code.

  6. Convert integer to string in Python - Stack Overflow

    Jun 23, 2019 · In the above program, int () is used to convert the string representation of an integer. Note: A variable in the format of string can be converted into an integer only if the variable is …

  7. Converting String variable to a Integer that supports decimal points

    Sep 27, 2023 · Integer type cannot have decimal point. Can you try to use Double type variable?

  8. Converting String to Int using try/except in Python

    Nov 10, 2011 · So I'm pretty stumped on how to convert a string into an int using the try/except function. Does anyone know a simple function on how to do this? I feel like I'm still a little hazy on string and i...

  9. Converting String to Integer Returns null in PySpark

    Dec 13, 2022 · I am trying to convert a string to integer in my PySpark code. input = 1670900472389, where 1670900472389 is a string I am doing this but it's returning null. df = …

  10. How can I convert an int to a string in C? - Stack Overflow

    How do you convert an int (integer) to a string? I'm trying to make a function that converts the data of a struct into a string to save it in a file.