[Gd-chatter] r10793 - trunk/libraries/xml-parser
hannes at gwydiondylan.org
hannes at gwydiondylan.org
Thu Jun 8 19:17:01 CEST 2006
Author: hannes
Date: Thu Jun 8 19:17:00 2006
New Revision: 10793
Modified:
trunk/libraries/xml-parser/interface.dylan
Log:
Job: minor
*fix trim-string if sequence contains only whitespaces (return "" then)
Modified: trunk/libraries/xml-parser/interface.dylan
==============================================================================
--- trunk/libraries/xml-parser/interface.dylan (original)
+++ trunk/libraries/xml-parser/interface.dylan Thu Jun 8 19:17:00 2006
@@ -143,7 +143,11 @@
let stop = ans.size;
while(stop > 1 & ans[stop - 1].is-space?) stop := stop - 1; end while;
while(start < ans.size & ans[start].is-space?) start := start + 1; end while;
- copy-sequence(ans, start: start, end: stop);
+ if (start < stop)
+ copy-sequence(ans, start: start, end: stop);
+ else
+ ""
+ end;
end function trim-string;
// these types are not put into the <document> when processing an xml document
More information about the chatter
mailing list