[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37333] textscan called with empty whitespace
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #37333] textscan called with empty whitespace |
Date: |
Fri, 14 Sep 2012 10:59:39 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 |
Follow-up Comment #7, bug #37333 (project octave):
Anyway, while processing your tests I failed to understand the last
(commented) one with "\b" (which if uncommented Just Works).
What exactly did you mean there?
I'll paste in what I made of it (note: double quotes allow \b etc to be
properly interpreted ('\b' remains \b, "\b" becomes a backspace char); forward
slashes as path separators also work on Windows from within Octave):
%% Test adding whitespace "\b" arg
%!test
tc = [];
tc{1, 1} = "C:/code;";
tc{1, end+1} = " C:/code/meas;";
tc{1, end+1} = "C:/code/sim;";
tc{1, end+1} = "C:/code/utils;";
string = [tc{:}];
c = textscan (string, "%s", "delimiter", ";", "whitespace", "\b");
for k = 1:numel (c{1})
lh = c{1}{k};
rh = tc{k};
rh(rh == ";") = "";
rh = strtrim (rh);
assert (strcmp (lh, rh));
end
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37333>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, anonymous, 2012/09/12
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Philip Nienhuis, 2012/09/12
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Philip Nienhuis, 2012/09/13
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Andy Register, 2012/09/13
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Andy Register, 2012/09/13
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Philip Nienhuis, 2012/09/13
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, anonymous, 2012/09/13
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace,
Philip Nienhuis <=
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Andy Register, 2012/09/14
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Andy Register, 2012/09/14
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Philip Nienhuis, 2012/09/14
- [Octave-bug-tracker] [bug #37333] textscan called with empty whitespace, Andy Register, 2012/09/14