本文整理汇总了C++中VString::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ VString::begin方法的具体用法?C++ VString::begin怎么用?C++ VString::begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VString
的用法示例。
在下文中一共展示了VString::begin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _lastNonTrailingIndexOfPathSeparator
static int _lastNonTrailingIndexOfPathSeparator(const VString& s, int& lengthWithoutTrailingSeparator) {
bool hasTrailingPathSeparator = s.endsWith(VFSNode::PATH_SEPARATOR_CHAR);
if (!hasTrailingPathSeparator) {
lengthWithoutTrailingSeparator = s.length();
return s.lastIndexOf(VFSNode::PATH_SEPARATOR_CHAR);
}
VString stripped;
s.getSubstring(stripped, s.begin(), s.end() - 1);
lengthWithoutTrailingSeparator = stripped.length();
return stripped.lastIndexOf(VFSNode::PATH_SEPARATOR_CHAR);
}
示例2: defineDependency
// define a dependency of one parameter respect to the other parameters and their respective values
// the parameters and values are expressed as follows: parameter1(value1)|...|parameterN(valueN)
bool ParameterManager::defineDependency(const char *strParameter, const char *strParametersAndValues) {
// (1) make sure the parameter exists
MParameter::iterator it = m_mParameter.find(strParameter);
if (it == m_mParameter.end()) {
return false;
}
Dependency dependency;
dependency.strParameter = strParameter;
// (2) parse the parameter(value) items
ParameterValue parameterValue;
VString *vString = getItemList(strParametersAndValues);
for(VString::iterator it = vString->begin() ; it != vString->end() ; ++it) {
size_t iOpen = (*it).find("(");
size_t iClose = (*it).rfind(")");
// just a parameter
if (iOpen == string::npos) {
if (iClose != string::npos) {
return false;
}
parameterValue.strParameter = *it;
parameterValue.strValue = "";
}
// a parameter with its corresponding value
else {
if (((*it).rfind("(") != iOpen) || ((*it).find(")") != iClose) || (iClose-iOpen < 2) || (iClose+1 != (*it).length())) {
return false;
}
parameterValue.strParameter = (*it).substr(0,iOpen);
parameterValue.strValue = (*it).substr(iOpen+1,iClose-(iOpen+1));
//printf("%s %s\n",parameterValue.strParameter.c_str(),parameterValue.strValue.c_str());
}
// check that the parameter actually exists
MParameter::iterator jt = m_mParameter.find(parameterValue.strParameter);
if (jt == m_mParameter.end()) {
return false;
}
// check that the parameter is different from the dependent parameter
if (parameterValue.strParameter.compare(strParameter) == 0) {
return false;
}
dependency.vParameterValue.push_back(parameterValue);
}
delete vString;
m_vDependency.push_back(dependency);
return true;
}
示例4: MapName
MapName(VString<15> v) : _impl(v.oislice_h(std::find(v.begin(), v.end(), '.'))) {}
示例5: getProcessedCodePoint
VCodePoint TestTailHandler::getProcessedCodePoint(int index) const {
VMutexLocker locker(&mMutex, "TestTailHandler::getProcessedCodePoint");
return *(mCollectedCodePoints.begin() + index);
}