Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Convert horizontal tab (	) into a space( )

Posted on 2004-08-12
6
Medium Priority
?
564 Views
Last Modified: 2008-02-01
How would Achieve this? I thought I might use a replace statement but it's not playing nice with the 	.
0
Comment
Question by:longjt
  • 4
6 Comments
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 11786770

/*
 * Created on Aug 12, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author Sudhakar
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Test1 {
      public static void main(String s[])
      {
            System.err.println("	".replaceAll("	"," ");
            
      }
}
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 11786848
static String replaceWord(String original, String find, String replacement) {
          int i = original.indexOf(find);
          if (i < 0) {
              return original;  // return original if 'find' is not in it.
          }
        
          String partBefore = original.substring(0, i);
          String partAfter  = original.substring(i + find.length());
        
          return partBefore + replacement + partAfter;
      }
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 11786905
>>I thought I might use a replace statement but it's not playing nice with the &#09;

Should work. What is the probem you ate facing??
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:longjt
ID: 11787819
Actually I gooffed. This is an asp question. Gata love programming in multiple languages.

the error is
                   Expected end of statement
this is on line:
                   strLine3 = Replace(strLine3), "&#09;", "&nbsp;"
0
 
LVL 14

Accepted Solution

by:
sudhakar_koundinya earned 300 total points
ID: 11790405
strLine3 = Replace(strLine3, "&#09;", "&nbsp;")
0
 
LVL 11

Expert Comment

by:sompol_kiatkamolchai
ID: 11791423
or ???

strLine3 = Replace strLine3, "&#09;", "&nbsp;"
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Take a look at these 6 Outlook Email management tools which can augment the working and performance of Microsoft Outlook to give you a more rewarding emailing experience.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question