Wednesday, February 15, 2006

Hate Java Less Today!

StringW makes me hate Java less.

God help you if you want to (easily) remove a file extension from a filename: you can String.split() but you cannot join, you can StringBuffer.replace() but it is not nice...

StringW make me happier

2 comments:

Phil Wilson said...

doesn't something like this work?

String strippedFilename = filename.substring(0, filename.lastIndexOf("."));

Dan said...

Can you people please stop posting sensible, working answers!

*hides IANAJP [i am not a java programmer] shame*