Results 1 to 3 of 3
  1. #1
    i4ba1 is offline Member
    Join Date
    Aug 2008
    Posts
    13
    Rep Power
    0

    Default String manipulation

    Hai all,

    i have the String word "Welcome To Gameloft" and String key "el". I want to cut the word el in word "Welcome To Gameloft" if the character in that word same with string key. So, the word be "Wcome To Gamoft". Can you help me, How can i do that?.

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by i4ba1 View Post
    Can you help me, How can i do that?.

    no problem, here is an example that produce what you describe

    Java Code:
    		String word = "Welcome To Gameloft";
    		String key = "el";
    		System.out.println(word.replaceAll(key, ""));

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

Similar Threads

  1. String Manipulation
    By tmotse in forum New To Java
    Replies: 1
    Last Post: 10-14-2010, 01:25 PM
  2. Help needed with string manipulation
    By stringkilla in forum New To Java
    Replies: 47
    Last Post: 09-07-2010, 03:25 AM
  3. Image manipulation.
    By ambikark in forum Advanced Java
    Replies: 0
    Last Post: 10-15-2008, 01:37 PM
  4. String manipulation example (Title case)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-29-2008, 09:04 AM
  5. String Manipulation Task
    By hiranya in forum New To Java
    Replies: 1
    Last Post: 11-19-2007, 11:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •