File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
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.
character representation of a blank space
String.replace to remove a character
String from JTextField
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014