A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
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
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: string.replace limited to only one character.
String from JTextField
character representation of a blank space
String.replace to remove a character
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015