comparison m-toolbox/classes/+utils/@xml/prepareString.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1
2 function s = prepareString(s)
3
4 if ~isempty(s)
5 % Convert the string into one line.
6 % Attention: The method which calls this method must store the shape of
7 % the string.
8 s = reshape(s, 1, []);
9
10 % Replace the new line character with the new line wildcard
11 s = strrep(s, sprintf('\n'), utils.xml.WILDCARD_NEWLINE);
12
13 % Replace the cvs tag characters with a wildcard
14 if ~isempty(s) && (s(1) == '$') && (s(end) == '$')
15 s = utils.xml.prepareVersionString(s);
16 end
17 end
18
19 end