Results 1 to 2 of 2
Thread: Blank space
- 04-21-2009, 08:19 AM #1
Member
- Join Date
- Apr 2009
- Posts
- 7
- Rep Power
- 0
- 04-21-2009, 10:00 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,546
- Rep Power
- 11
Perhaps you could be more specific?
If you want to convert every character to a blank space, use the String method length() to determine how many characters there are then make a new String with that many spaces.
If there are certain restrictions on the character you could use a regular expression:
If it's a particular character:Java Code:String data = ... String regex = /*whatever*/ data = data.replaceAll(regex, " ");
Java Code:String data = ... char chToBeReplaced = /*whatever*/ data = data.replace(String.valueOf(chToBeReplaced), " ");
Similar Threads
-
how can we remove blank lines from a .txt
By Camden in forum New To JavaReplies: 12Last Post: 07-29-2011, 01:38 PM -
Tiff Split when it found blank pages
By jazz2k8 in forum Advanced JavaReplies: 2Last Post: 08-25-2008, 12:04 PM -
netbeans 6.0 not show commpunent or show blank page
By fahimaamir in forum NetBeansReplies: 1Last Post: 01-26-2008, 06:20 AM -
Print a blank space
By susan in forum New To JavaReplies: 2Last Post: 07-30-2007, 01:58 PM -
Blank result for jsp_servlet in Eclipse
By Unni in forum EclipseReplies: 2Last Post: 07-12-2007, 04:30 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks