I am wondering if I am going about splitting a string on a . the right way? My code is:
.
String[] fn = filename.split(\".\"); return fn[0];
Wouldn't it be more efficient to use
filename.substring(0, filename.indexOf("."))
if you only want what's up to the first dot?