本文整理汇总了C++中SbString::getSubString方法的典型用法代码示例。如果您正苦于以下问题:C++ SbString::getSubString方法的具体用法?C++ SbString::getSubString怎么用?C++ SbString::getSubString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SbString
的用法示例。
在下文中一共展示了SbString::getSubString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
// add a name to the upgrader lookup dict.
static void
soupgrader_add_to_namedict(const SbString & name)
{
assert(soupgrader_namedict);
// Note: the SbString->SbName wrapping is necessary, or the const
// char* will _not_ be valid upon the SbString going out of scope
// (while SbName makes permanent const char* references).
soupgrader_namedict->put(SbName(name.getString()).getString(), NULL);
// Create lookup both with and without the "So" prefix. This is
// necessary for the hash lookup in soupgrader_exists() to match
// with both permutations.
SbString tmp;
if (name.compareSubString("So") == 0) {
tmp = name.getSubString(2);
}
else {
tmp = "So";
tmp += name;
}
// Note: the SbString->SbName wrapping is necessary, see above
// comment.
soupgrader_namedict->put(SbName(tmp.getString()).getString(), NULL);
}