Hi.
Sorry, for insignificant question.
It’s question like “What was first - egg or hen?” but
const String File::getFileNameWithoutExtension() const throw()
{
const int lastSlash = fullPath.lastIndexOfChar (separator) + 1;
const int lastDot = fullPath.lastIndexOfChar (T('.'));
if (lastDot > lastSlash)
return fullPath.substring (lastSlash, lastDot);
else
return fullPath.substring (lastSlash);
}
works identical for folders and for files.
You could tell that I should check is it folder or file and change behavior of my program. I do this now. But maybe…
Any thinks?
