Not really related, but StringUtils::Mid(strFileNameAndPath, i+1); might be easier code to read.