Ejemplo n.º 1
0
void File::getFileExtension(StringStorage *ext) const
{
  StringStorage fileName;

  getName(&fileName);

  int pointPos = fileName.findLast(_T('.'));

  if (pointPos == -1) {
    ext->setString(_T(""));
  } else {
    fileName.getSubstring(ext, pointPos + 1, fileName.getLength() - 1);
  }
}