Results 1 to 9 of 9
- 07-24-2012, 02:41 AM #1
Member
- Join Date
- Jul 2012
- Posts
- 27
- Rep Power
- 0
- 07-24-2012, 03:02 AM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
Re: Strings. Deleting certain character in a String
Can't you just do someting like:
For more detail you can read it here: String (Java 2 Platform SE 5.0)Java Code:str = str.replace("X", "");Website: Learn Java by Examples
- 07-24-2012, 03:13 AM #3
Member
- Join Date
- Jul 2012
- Posts
- 27
- Rep Power
- 0
- 07-24-2012, 03:33 AM #4
Member
- Join Date
- Jul 2012
- Posts
- 27
- Rep Power
- 0
Re: Strings. Deleting certain character in a String
ha, it doesnt work if I use a variable... but I need the variable to determine the letter I want to be replaced.
- 07-24-2012, 03:59 AM #5
Member
- Join Date
- Jul 2012
- Posts
- 27
- Rep Power
- 0
Re: Strings. Deleting certain character in a String
Ok I got it now.. thanks :D
- 07-29-2012, 05:33 AM #6
Member
- Join Date
- Jul 2012
- Posts
- 27
- Rep Power
- 0
Re: Strings. Deleting certain character in a String
hmm how about changing only one character.. .replace changes all the occurrence of that character in a string.. example "develop" change the first e into something else ... like duvelop
- 07-29-2012, 05:38 AM #7
Student
- Join Date
- Jul 2012
- Location
- United States
- Posts
- 328
- Rep Power
- 1
Re: Strings. Deleting certain character in a String
I promise that you will find the necessary method in here: String (Java Platform SE 7 )
"Success is not final, failure is not fatal: it is the courage to continue that counts." - Winston Churchill
- 07-29-2012, 05:45 AM #8
Member
- Join Date
- Jul 2012
- Posts
- 27
- Rep Power
- 0
Re: Strings. Deleting certain character in a String
can you give me a hint ;)
- 07-29-2012, 05:58 AM #9
Student
- Join Date
- Jul 2012
- Location
- United States
- Posts
- 328
- Rep Power
- 1
Similar Threads
-
String problem: deleting
By BlueBird in forum New To JavaReplies: 3Last Post: 03-18-2011, 05:21 AM -
Handling Multi byte Character Strings
By madhav1351 in forum Advanced JavaReplies: 2Last Post: 09-22-2010, 12:55 PM -
Hejp with deleting string from JTextField
By satin in forum New To JavaReplies: 9Last Post: 11-08-2008, 11:05 PM -
[SOLVED] Handling strings including " character
By flywheel in forum New To JavaReplies: 5Last Post: 09-29-2008, 03:45 AM -
deleting characters from a String
By Hayzam in forum New To JavaReplies: 4Last Post: 08-29-2008, 12:14 PM


LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks