leaks.work icon faq transparent

How to convert string to integer in android programitically

Fox669     2020-12-12     207


207

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
207 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

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



Create with ❤ by Leaks 2020 & Malitanyo