MathGroup Archive 2006

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

Search the Archive

Re: Deleting charachter from a text file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68148] Re: [mg68131] Deleting charachter from a text file
  • From: Adriano Pascoletti <pascolet at dimi.uniud.it>
  • Date: Wed, 26 Jul 2006 02:26:13 -0400 (EDT)
  • References: <200607250801.EAA28697@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Giacomo,
try StringDrop[ ..., -2]

Adriano Pascoletti

On 25 lug 2006, at 10:01, Giacomo Ciani wrote:

> Hello,
>
> I'm using direct access to text files to save data my program
> generates. So I use a syntax like:
>
> OpenWrite[file];
> WriteString[file,"text"];
> ...
> WriteString[file,"text2"];
> ...
> Ecc...
> Close[file]
>
> I would like to be able to remove some characters (i.e. the last two
> characters) from the file before writing new ones (as an example, I
> could need to remove the "xt" character of the word "text" before
> writing the word "text2"). How can I accomplish this? I can't find any
> function in the documentation to remove characters from a file...
>
> Thanks
>
> Giacomo
>


  • Prev by Date: Finding maximal linear orders in directed graphs
  • Next by Date: Error message "MakeExpression::boxfmt: InputForm in MakeExpression (...) is
  • Previous by thread: Deleting charachter from a text file
  • Next by thread: Re: Deleting charachter from a text file