Saturday, 31 August 2013

How to extract a particular string from a String variable

How to extract a particular string from a String variable

I am getting a string which contains the name of the file along woth
extension for ex as shown below..
String s = abcdf.dat ;// Now as shown file abcde having a .dat extension
Now i want to store the file name only in another string but not the
extension so I want to store in this format such as ..
String p= abcdf ; //only file name please advise how to achieve this

No comments:

Post a Comment