MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: remove whitespace

vickyisai at wrote:

> I have a txt file and i want to remove all whitespaces in that file .
> I am trying to get a list of all characters in that file ..and it
> takes whitespace too,which i wnat to eleminate.
> I used ReadList which works as I want, but it takes all
> whitespaces,....
> How can i overcome this problem.
> I use Mathematica 5.2

You could use *StringReplace*.

In[1]:= data = {"The Quick Brown", "Fox Jump Over", "The Lazy Dog."};

In[2]:= StringReplace[data, Whitespace -> ""]

Out[2]= {"TheQuickBrown", "FoxJumpOver", "TheLazyDog."}


  • Prev by Date: eigenvectors is taking lot of time
  • Next by Date: Re: Gradient of a List
  • Previous by thread: Re: remove whitespace
  • Next by thread: (x|y) \[element] Integers in Reduce function