1 /***************************************************************************
2 copyright : (C) 2007 by Shane King
3 email : kde@dontletsstart.com
4 ***************************************************************************/
6 /***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1, or (at your option) any later version, as published by the Free *
10 * Software Foundation. *
12 * This library is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15 * Lesser General Public License for more details. *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with this library; if not, write to the Free Software *
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
21 ***************************************************************************/
23 #include "tfile_helper.h"
29 bool CheckExtensionImpl(const char *fileName
, const char *extension
)
31 const char *ext
= strrchr(fileName
, '.');
32 return ext
&& !strcasecmp(ext
, extension
);
35 bool CheckExtensionImpl(const wchar_t *fileName
, const wchar_t *extension
)
37 const wchar_t *ext
= wcsrchr(fileName
, L
'.');
38 return ext
&& !wcscasecmp(ext
, extension
);