本文整理汇总了C++中AnsiString::toLowercase方法的典型用法代码示例。如果您正苦于以下问题:C++ AnsiString::toLowercase方法的具体用法?C++ AnsiString::toLowercase怎么用?C++ AnsiString::toLowercase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnsiString
的用法示例。
在下文中一共展示了AnsiString::toLowercase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadFile
bool BaseSprite::loadFile(const Common::String &filename, int lifeTime, TSpriteCacheType cacheType) {
Common::SeekableReadStream *file = BaseFileManager::getEngineInstance()->openFile(filename);
if (!file) {
BaseEngine::LOG(0, "BaseSprite::LoadFile failed for file '%s'", filename.c_str());
if (_gameRef->_debugDebugMode) {
return loadFile("invalid_debug.bmp", lifeTime, cacheType);
} else {
return loadFile("invalid.bmp", lifeTime, cacheType);
}
} else {
BaseFileManager::getEngineInstance()->closeFile(file);
file = nullptr;
}
bool ret = STATUS_FAILED;
AnsiString filePrefix = filename;
AnsiString ext = PathUtil::getExtension(filename);
ext.toLowercase();
filePrefix.toLowercase();
if (filePrefix.hasPrefix("savegame:") || (ext == "bmp") || (ext == "tga") || (ext == "png") || (ext == "jpg")) {
BaseFrame *frame = new BaseFrame(_gameRef);
BaseSubFrame *subframe = new BaseSubFrame(_gameRef);
subframe->setSurface(filename, true, 0, 0, 0, lifeTime, true);
if (subframe->_surface == nullptr) {
BaseEngine::LOG(0, "Error loading simple sprite '%s'", filename.c_str());
ret = STATUS_FAILED;
delete frame;
delete subframe;
} else {
subframe->setDefaultRect();
frame->_subframes.add(subframe);
_frames.add(frame);
_currentFrame = 0;
ret = STATUS_OK;
}
} else {
char *buffer = (char *)BaseFileManager::getEngineInstance()->readWholeFile(filename);
if (buffer) {
if (DID_FAIL(ret = loadBuffer(buffer, true, lifeTime, cacheType))) {
BaseEngine::LOG(0, "Error parsing SPRITE file '%s'", filename.c_str());
} else {
ret = STATUS_OK;
}
delete[] buffer;
}
}
setFilename(filename.c_str());
return ret;
}
示例2: addScriptTime
void ScEngine::addScriptTime(const char *filename, uint32 time) {
if (!_isProfiling) {
return;
}
AnsiString fileName = filename;
fileName.toLowercase();
_scriptTimes[fileName] += time;
}
示例3: normalizeFileName
AnsiString PathUtil::normalizeFileName(const AnsiString &path) {
AnsiString newPath = unifySeparators(path);
newPath.toLowercase();
return newPath;
}