bool device_image_interface::uses_file_extension(const char *file_extension) const { bool result = FALSE; if (file_extension[0] == '.') file_extension++; /* find the extensions */ astring extensions(file_extensions()); char *ext = strtok((char*)extensions.cstr(),","); while (ext != NULL) { if (!mame_stricmp(ext, file_extension)) { result = TRUE; break; } ext = strtok (NULL, ","); } return result; }
bool device_image_interface::uses_file_extension(const char *file_extension) const { bool result = false; if (file_extension[0] == '.') file_extension++; /* find the extensions */ std::string extensions(file_extensions()); char *ext = strtok((char*)extensions.c_str(),","); while (ext != nullptr) { if (!core_stricmp(ext, file_extension)) { result = true; break; } ext = strtok (nullptr, ","); } return result; }