leaks.work icon faq transparent

How to convert string to integer in android programitically

Fox669     2020-12-12     129


129

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

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



Create with ❤ by Leaks 2020 & Malitanyo