本文整理汇总了C++中xbox::VString::Insert方法的典型用法代码示例。如果您正苦于以下问题:C++ VString::Insert方法的具体用法?C++ VString::Insert怎么用?C++ VString::Insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xbox::VString
的用法示例。
在下文中一共展示了VString::Insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _BuildRegexMatcher
XBOX::VError VHTTPServerProject::_BuildRegexMatcher (const XBOX::VString& inPatternString, XBOX::VRegexMatcher **outMatcher)
{
if (NULL == outMatcher)
return XBOX::VE_INVALID_PARAMETER;
XBOX::VString patternString (inPatternString);
XBOX::VError error = XBOX::VE_OK;
sLONG pos = 0;
if (!HTTPServerTools::BeginsWithASCIICString (patternString.GetCPointer(), "(?i)"))
patternString.Insert (CVSTR ("(?i)"), 1);
if (HTTPServerTools::EndsWithASCIICString (patternString, "/") &&
!HTTPServerTools::EndsWithASCIICString (patternString, "$"))
patternString.AppendString (CVSTR (".*"));
XBOX::VString string;
if ((pos = patternString.FindUniChar (CHAR_CIRCUMFLEX_ACCENT)) == 0)
{
string.FromCString ("^");
pos = HTTPServerTools::FindASCIICString (patternString, "(?i)") + 4;
}
else
{
++pos;
}
#if HTTP_SERVER_USE_PROJECT_PATTERNS
if (!fSettings->GetProjectPattern().IsEmpty())
{
string.AppendCString ("(/");
string.AppendString (fSettings->GetProjectPattern());
string.AppendCString ("|)");
}
#endif
patternString.Insert (string, pos);
if (!patternString.IsEmpty())
*outMatcher = XBOX::VRegexMatcher::Create (patternString, &error);
return error;
}