I have the following code:
String path = "F:\\Example\\Words With Spaces\\something.ext"; StringArray pathComponents; pathComponents.addTokens(path , "."); String fileExt = pathComponents[pathComponents.size() - 1];
In the end, fileExt is “Spaces\\something.ext”. This is unexpected. I was hoping it would be “ext”. It appears to be using the space character as the delimiter instead of the period.