A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
string.replace limited to only one character.
Joined: Jun 22, 2001
Jun 22, 2001 12:57:00
Is there a way to use string.replace or another method to remove the occurrence of more than one character. In other words, how could I remove the word "cat" from the following
myString = "That dog ate the neighbors cat!"
Joined: Feb 26, 2001
Jun 22, 2001 14:28:00
class has methods that will let you do what you want. Check out the delete() method.
Junilu - [
How to Ask Questions
How to Answer Questions
I agree. Here's the link:
subject: string.replace limited to only one character.
String.replace to remove a character
String from JTextField
character representation of a blank space
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013