MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getGroup

Method getGroup

Engine/source/util/settings.cpp:567–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567String SettingSaveNode::getGroup(const String &name, S32 num)
568{
569 String::SizeType pos = 0;
570 String::SizeType lastPos = 0;
571 S32 count = 0;
572
573 while(pos != String::NPos)
574 {
575 lastPos = pos;
576 pos = name.find("/", pos + 1);
577
578 if(count == num)
579 {
580 String::SizeType startPos = lastPos;
581
582 if(count > 0)
583 startPos++;
584
585 if(pos == String::NPos)
586 return name.substr(startPos, name.length() - (startPos));
587 else
588 return name.substr(startPos, pos - startPos);
589 }
590
591 count++;
592 }
593
594 return String("");
595}
596
597String SettingSaveNode::getSettingName(const String &name)
598{

Callers 10

initMethod · 0.45
_overrideFeaturesMethod · 0.45
addObjectMethod · 0.45
undoMethod · 0.45
deleteObjectMethod · 0.45
addObjectMethod · 0.45
_determineFeaturesMethod · 0.45

Calls 4

substrMethod · 0.80
StringClass · 0.50
findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected