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

Re: [sc-dev] String:escapeSpaces




On 29 Nov 2006, at 15:29, Julian Rohrhuber wrote:

I was having a problem with a server not booting from a build in a dir with several spaces in the path.

Any reason not to add this:

+ String {
	escapeSpaces {
		var result;
		this.do({ arg char;
if(char.isSpace,{result = result ++ $\\ ++ " "},{result = result ++ char})
		});
		^result
	}
}

and then stick it in in the various String methods which deal with paths?

shouldn't this happen in String:standardizePath ?
--

In Cocoa? I suppose that makes sense and wouldn't be difficult.

S.