R
Ronald Fischer
I have a string representing the name of a java file. I would
like to get a new string, where the extension .java has been
replaced by .class.
My approach was to use String#sub:
filename=3D"abc/x.java"
filename.sub(/java$/,'class')=20
This works fine, but I wonder whether there isn't a more
elegant way to do it.
Ronald
--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162
like to get a new string, where the extension .java has been
replaced by .class.
My approach was to use String#sub:
filename=3D"abc/x.java"
filename.sub(/java$/,'class')=20
This works fine, but I wonder whether there isn't a more
elegant way to do it.
Ronald
--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162