Solved

Convert horizontal tab (	) into a space( )

Posted on 2004-08-12
6
560 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 75 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

Industry Leaders: 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!

Question has a verified solution.

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

This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 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