本文整理汇总了C++中StringVector::End方法的典型用法代码示例。如果您正苦于以下问题:C++ StringVector::End方法的具体用法?C++ StringVector::End怎么用?C++ StringVector::End使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringVector
的用法示例。
在下文中一共展示了StringVector::End方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InsertAlpha
void InsertAlpha(StringVector &container, const String &value)
{
if (container.Find(value) != container.End())
return;
for(auto iter = container.Begin(); iter != container.End(); ++iter)
{
if (value.Compare((*iter), false) < 0)
{
container.Insert(iter, value);
return;
}
}
container.Push(value);
}
示例2: BuildManaged
bool BuildWindows::BuildManaged(const String& buildPath)
{
ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
FileSystem* fileSystem = GetSubsystem<FileSystem>();
Project* project = toolSystem->GetProject();
ProjectSettings* settings = project->GetProjectSettings();
String projectPath = project->GetProjectPath();
#ifdef ATOMIC_DEBUG
String config = "Debug";
#else
String config = "Release";
#endif
String managedBins = projectPath + ToString("AtomicNET/%s/Bin/Desktop/", config.CString());
String managedExe = managedBins + settings->GetName() + ".exe";
if (!fileSystem->FileExists(managedExe))
{
FailBuild(ToString("Error building managed project, please compile the %s binary %s before building", config.CString(), managedExe.CString()));
return false;
}
StringVector results;
StringVector filtered;
fileSystem->ScanDir(results, managedBins, "", SCAN_FILES, false);
StringVector filterList;
StringVector::Iterator itr = results.Begin();
while (itr != results.End())
{
unsigned i;
for (i = 0; i < filterList.Size(); i++)
{
if (itr->Contains(filterList[i]))
break;
}
if (i == filterList.Size())
filtered.Push(*itr);
itr++;
}
for (unsigned i = 0; i < filtered.Size(); i++)
{
String filename = filtered[i];
if (!BuildCopyFile(managedBins + filename, buildPath_ + "/" + filename))
return false;
}
return true;
}
示例3: SetStringVector
bool XMLElement::SetStringVector(const StringVector& value)
{
if (!RemoveChildren("string"))
return false;
for (StringVector::ConstIterator i = value.Begin(); i != value.End(); ++i)
{
XMLElement stringElem = CreateChild("string");
if (!stringElem)
return false;
stringElem.SetAttribute("value", *i);
}
return true;
}
示例4: ParseCommand
void ParseCommand(String input, String &command, StringVector ¶meters)
{
input = input.Trimmed();
if (input.Empty())
return;
uint parenPos = input.Find('(', 0);
uint spacePos = input.Find(' ', 0);
if (parenPos == String::NPOS && spacePos == String::NPOS)
{
command = input;
return;
}
StringVector parts;
if (parenPos != String::NPOS && parenPos < spacePos)
{
uint parenEndPos = input.FindLast(')');
String insideParens = (parenEndPos != String::NPOS ?
input.Substring(parenPos+1, parenEndPos-parenPos-1).Trimmed() : input.Substring(parenPos+1).Trimmed());
command = input.Substring(0, parenPos).Trimmed();
// "one, two, three", "one,two,three" and "one two three"
parts = insideParens.Contains(',') ? insideParens.Split(',') : insideParens.Split(' ');
}
else
{
command = input.Substring(0, spacePos).Trimmed();
String remaining = input.Substring(spacePos+1).Trimmed();
// "one, two, three", "one,two,three" and "one two three"
parts = remaining.Contains(',') ? remaining.Split(',') : remaining.Split(' ');
}
for(StringVector::Iterator iter=parts.Begin(); iter!=parts.End(); ++iter)
{
String part = (*iter).Trimmed();
if (part.EndsWith(","))
part = part.Substring(0, part.Length()-1);
if (!part.Empty())
parameters.Push(part);
}
}