Am 01.08.2011, 22:50 Uhr, schrieb Jonathan M Davis <jmdavisp...@gmx.com>:
The problem with that is that then you _can't_ have something like "foo..bar".

I used to have a library of sound files when I was young. Some of them were spoken sentences and I named the files according to what was said. While I couldn't use a question mark I did use ! and .
"If I was torturing someone, he wouldn't be allowed to sit..wav"
With Explorer hiding the known extension it looked fine. The .NET way is fine for the general case, but I learnt that a file only has an extension when the file name doesn't end with the dot. So I'd expect the semantics to be
setExtension('I am a file name', 'bar') == 'I am a file name.bar'
setExtension('I am a file name.', 'bar') == 'I am a file name..bar'
setExtension('I am a file name', '.bar') == 'I am a file name.bar'
setExtension('I am a file name.', '.bar') == 'I am a file name..bar'

Reply via email to