[Logo]
Forums Register Login
Basic editing with strings
Hi, Im confused right now. Im having problems to edeting strings. I have a string "adam;john;doris;william;". Then I want to remove "doris;" from the string. I havent found a good way to solve this, not with Strings and not with Arrays... Perhaps the lack of sleep is making my dizzy...
Try to use StringTokenizer class. Did you tried? This is the simplest solution.
StringTokenizer is not available in MIDP 1.0 neither MIDP 2.0. I guess
you have to do it on your own way.

arnel
yes that's true stringtokenizer is not available :roll:
But its has to be a simple sollution to this problem? I cant be the first guy to facing it?
damn I wish this site would upgrade to some better forum software and display the thread on the post page somewhere. Anyways the basic problem you are having is that String objects are immutable; which means that you cannot alter them in place like you could in C. What you need to do is make a new a string by concatating together the two pieces around the part your removing.


Something like that anyways
We can walk to school together. And we can both read this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA


This thread has been viewed 760 times.

All times above are in ranch (not your local) time.
The current ranch time is
Aug 17, 2018 17:21:10.