[Omake] How to pass an empty string to concat()?
Dmitry Bely
dmitry.bely at gmail.com
Sat Dec 1 09:34:32 PST 2007
This just does not work:
osh
% d=''
- : <string ''>
: String
% println($(concat $(d),1 2 3))
1''2''3
% d=$''
% println($(concat $(d),1 2 3))
%
(even worse - here I cannot leave osh normally and can only kill it)
Why I need it? I am trying to write a function that converts
backslashes in the string to forward slashes, e.g.
"c:\some\path" -> "c:/some/path"
As foreach cannot be directly applied to string characters (right?) I
am going to convert string to the sequence, transform it and then
merge back into the string by concat(). Wrong approach?
- Dmitry Bely
More information about the Omake
mailing list