本文整理汇总了C++中CFX_ByteString::Right方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_ByteString::Right方法的具体用法?C++ CFX_ByteString::Right怎么用?C++ CFX_ByteString::Right使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_ByteString
的用法示例。
在下文中一共展示了CFX_ByteString::Right方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ScanPath
void CFPF_SkiaFontMgr::ScanPath(FX_BSTR path)
{
void *handle = FX_OpenFolder(path.GetCStr());
if (!handle) {
return;
}
CFX_ByteString filename;
FX_BOOL bFolder = FALSE;
while (FX_GetNextFile(handle, filename, bFolder)) {
if (bFolder) {
if (filename == FX_BSTRC(".") || filename == FX_BSTRC("..")) {
continue;
}
} else {
CFX_ByteString ext = filename.Right(4);
ext.MakeLower();
if (ext != FX_BSTRC(".ttf") && ext != FX_BSTRC(".ttc")) {
continue;
}
}
CFX_ByteString fullpath = path;
fullpath += "/";
fullpath += filename;
if (bFolder) {
ScanPath(fullpath);
} else {
ScanFile(fullpath);
}
}
FX_CloseFolder(handle);
}
示例2: ScanPath
void CFX_FolderFontInfo::ScanPath(CFX_ByteString& path)
{
void* handle = FX_OpenFolder(path);
if (handle == NULL) {
return;
}
CFX_ByteString filename;
FX_BOOL bFolder;
while (FX_GetNextFile(handle, filename, bFolder)) {
if (bFolder) {
if (filename == "." || filename == "..") {
continue;
}
} else {
CFX_ByteString ext = filename.Right(4);
ext.MakeUpper();
if (ext != ".TTF" && ext != ".OTF" && ext != ".TTC") {
continue;
}
}
CFX_ByteString fullpath = path;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
fullpath += "\\";
#else
fullpath += "/";
#endif
fullpath += filename;
if (bFolder) {
ScanPath(fullpath);
} else {
ScanFile(fullpath);
}
}
FX_CloseFolder(handle);
}
示例3: GetStyleType
FX_INT32 GetStyleType(const CFX_ByteString &bsStyle, FX_BOOL bRevert)
{
FX_INT32 iLen = bsStyle.GetLength();
if (!iLen) {
return -1;
}
int iSize = sizeof(g_FontStyles) / sizeof(FX_FontStyle);
const FX_FontStyle *pStyle = NULL;
for (int i = iSize - 1; i >= 0; --i) {
pStyle = g_FontStyles + i;
if (!pStyle || pStyle->len > iLen) {
continue;
}
if (!bRevert) {
if (bsStyle.Left(pStyle->len).Compare(pStyle->style) == 0) {
return i;
}
} else {
if (bsStyle.Right(pStyle->len).Compare(pStyle->style) == 0) {
return i;
}
}
}
return -1;
}