本文整理汇总了C++中nglString::Tokenize方法的典型用法代码示例。如果您正苦于以下问题:C++ nglString::Tokenize方法的具体用法?C++ nglString::Tokenize怎么用?C++ nglString::Tokenize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nglString
的用法示例。
在下文中一共展示了nglString::Tokenize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nglPath_IsRO
bool nglPath_IsRO(nglString& rOptions)
{
std::vector<nglString> tokens;
std::vector<nglString>::iterator i;
rOptions.Tokenize(tokens, _T(','));
for (i = tokens.begin(); i != tokens.end(); i++)
if ((*i) == _T("ro")) return true;
return false;
}
示例2: OnOutput
void nglConsole::OnOutput(const nglString& rText)
{
// 'char' mode : string buffer is considered to use the locale's encoding
Append(rText.GetChars());
// Write to the standard win32 console:
#ifdef USE_STANDARD_WIN32_CONSOLE
unsigned long res = 0;
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),rText.GetChars(),rText.GetLength(),&res,NULL);
#endif
// I don't care if this is slow, its really mandatory in win32.
vector<nglString> vec;
uint ret=rText.Tokenize(vec, _T('\n'));
for (uint i=0; i<ret; i++)
{
OutputDebugString(vec[i].GetChars()); // fixme! to be removed ?
OutputDebugString(_T("\n"));
}
}
示例3: _SetPanose
void nuiFontRequest::_SetPanose(const nglString& rPanose)
{
std::vector<nglString> tokens;
rPanose.Tokenize(tokens);
if (tokens.size() != 10)
{
NGL_LOG("font", NGL_LOG_ERROR, "Panose information MUST be 10 numbers from 0 to 255");
return;
}
uint8 PanoseBytes[10];
for (uint32 i = 0; i < 10; i++)
{
if (!tokens[i].IsInt())
{
NGL_LOG("font", NGL_LOG_ERROR, "Each of the 10 Panose values must be a number from 0 to 255");
return;
}
PanoseBytes[i] = tokens[i].GetCInt();
}
nuiPanose panose(PanoseBytes);
MustBeSimilar(panose, 1.0f);
}