简体   繁体   中英

How to Divide String in java after particular point?

Hey Guys I am learning android making a new calculator app I am taking input from user in string eg- 2045+5623 in single textview and stored in single string now I want to break this string after any operator into two parts and store it into two different substrings. Is it possible to do that also String.substring will not work here because it requires an index number start and endpoint and we can't provide that because the user can input any number also my idea is parse that two string into integer perform operation the display the result in textview Is this a right approach?

Please Help me

Hey Guys I am learning android making a new calculator app I am taking input from user in string eg- 2045+5623 in single textview and stored in single string now I want to break this string after any operator into two parts and store it into two different substrings. Is it possible to do that also String.substring will not work here because it requires an index number start and endpoint and we can't provide that because the user can input any number also my idea is parse that two string into integer perform operation the display the result in textview Is this a right approach?

Please Help me

Hey Guys I am learning android making a new calculator app I am taking input from user in string eg- 2045+5623 in single textview and stored in single string now I want to break this string after any operator into two parts and store it into two different substrings. Is it possible to do that also String.substring will not work here because it requires an index number start and endpoint and we can't provide that because the user can input any number also my idea is parse that two string into integer perform operation the display the result in textview Is this a right approach?

Please Help me

Hey Guys I am learning android making a new calculator app I am taking input from user in string eg- 2045+5623 in single textview and stored in single string now I want to break this string after any operator into two parts and store it into two different substrings. Is it possible to do that also String.substring will not work here because it requires an index number start and endpoint and we can't provide that because the user can input any number also my idea is parse that two string into integer perform operation the display the result in textview Is this a right approach?

Please Help me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM