I am trying to figure out this substring feature and whether there exists a function call for it or not. As far as I can find, here and here along with various other places, there simply is no related function for this since strings are char arrays, and so they settled for only implementing the indexing feature.
MWE:
fileID = fopen('tryMe.env');
outDate = fgetl(fileID);
Where the file 'tryMe.env'
only consists of 1 line like so:
2014/9/4
My wanted result is:
outDate =
'14/9/4'
I am trying to find a clean, smooth one liner to go with the variable definition of outDate
, something along the lines of outDate = fgetl(fileID)(3:end);
, and not several lines of code.
Thank you for your time!