| about | help | done | prefs | create account |
Java > String-3 > notReplace
prev | next | chance
| Given a string, return a string where every appearance of the lowercase word "is" has been replaced with "is not". The word "is" should not be immediately preceeded or followed by a letter -- so for example the "is" in "this" does not count. (Note: Character.isLetter(char) tests if a char is a letter.)
notReplace("is test") → "is not test" notReplace("is-is") → "is not-is not" notReplace("This is right") → "This is not right" ...Save, Compile, Run See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops |
Forget It! -- delete my code for this problem 333.0
Copyright Nick Parlante 2006-10 - privacy