help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fgetl() on Windows


From: AlexG1
Subject: Re: fgetl() on Windows
Date: Tue, 12 May 2009 09:33:34 -0700 (PDT)



Bobatapl wrote:
> 
> Hi Alex,
> 
> You can get rid of the <cr> at the end of the line using:
> 
> dos2unix file.in file.out
> 
> If you don't have access to a Unix or Linux system, there may be a
> Windows version of that function.  If you know anyone with a Linux or
> Unix system they will have the proper function and can easily do it for
> you.
> 
> Also there is a complementary function: unix2dos which adds the <cr> and
> linefeed to the end of every line.
> 
> Bob
> 
> 

Hmm, no such function on the Windows version.
Letting someone do it manually for every file isn't practical since this
script might be used quite often and not only by myself.

For now I solved the problem by using strtrim() on the string returned by
fgetl(), apparently it removes the <cr> tag.

-- 
View this message in context: 
http://www.nabble.com/fgetl%28%29-on-Windows-tp23483929p23506070.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]