#include <cstring>
#include <cctype>
// ...
if (strlen(p) > 4) {
const char* ext = p + strlen(p) - 4;
if (_stricmp(ext, ".csv") == 0) {
// 拡張子が .csv または .CSV
}
}_stricmp()は大文字小文字区別しない比較関数。
#include <cstring>
#include <cctype>
// ...
if (strlen(p) > 4) {
const char* ext = p + strlen(p) - 4;
if (_stricmp(ext, ".csv") == 0) {
// 拡張子が .csv または .CSV
}
}_stricmp()は大文字小文字区別しない比較関数。