On 17.07.2011 23:27, Lars T. Kyllingstad wrote:
- Should it be specified/documented whether a function returns "" or null? Specifically, is it important thatextension("foo") is null extension("foo.") !is null&& extension("foo.") == ""
I guess you've already thought about this, but one solution is to just return the dot as part of the extension. Then you get extension("foo.") == ".". I noticed that .NET's getExtension method does this.
setExtension and defaultExtension would probably have to change to at least accept extensions that include the dot, if extension() is changed.
