leaks.work icon faq transparent

How to convert string to integer in android programitically

Fox669     2020-12-12     70


70

I have a problem regarding on my string code i want to convert the string value to integer. 

example:

  • String wea = "samole123vsh454";
  • now i want to get the integer value online example resint Int math = 123454;

Anyone can help me to convert that string to integer.

asked
1 answers
70 votes


Tags:   Android string to integer, Android string, integer converter
Categories:   tutorials
Share to:    Facebook  Twitter  Linkedin


Comments 1


   
Option 1: Integer.parseInt(et.getText().toString()); option2: String s="your1string2contain3with4number"; option3 int i=Integer.parseInt(s.replaceAll("[\D]", "")); int i=Integer.parseInt("hello123".replaceAll("[\D]",""));


   Leave a comment




Similar post

85 How to upload or publish my aide ide project on Google playstore
» By: Fastil y
182 how to download video from youtube?
» By: mikail
77 How to get email addresses while fetching google contacts in angular 10
» By: Honey Goel
148 The best way to hack adf.ly and earn money online
» By: Fingler Tools
100 How to integrate in-app purschase in AIDE IDE (Billing)
» By: Csharp++
1650 Backlinks by via comment from the forum or website
» By: Backlinks
46 Sample Schema or snippet or google rich results in 2021
» By: Schema sample codes
75 Create anime tagalog dubbed blogs - tagalog tutorials
» By: Anime Tagalog tutorial
55 Create your own Anime Tagalog blogs without uploading videos
» By: Anime tagalog Blogs



Create with ❤ by Leaks 2020 & Malitanyo