MCPcopy Create free account
hub / github.com/devosoft/avida / Find

Method Find

avida-core/source/tools/cInitFile.cc:319–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317
318
319bool cInitFile::Find(cString& in_string, const cString& keyword, int col) const
320{
321 bool found = false;
322
323 // Loop through all of the lines looking for this keyword. Start with
324 // the actual file...
325 for (int line_id = 0; line_id < m_lines.GetSize(); line_id++) {
326 cString cur_string = m_lines[line_id]->line;
327
328 // If we found the keyword, return it and stop.
329 if (cur_string.GetWord(col) == keyword) {
330 m_lines[line_id]->used = true;
331 in_string = cur_string;
332 found = true;
333 }
334 }
335
336 return found; // Not Found...
337}
338
339
340cString cInitFile::ReadString(const cString& name, cString def, bool warn_default) const

Callers 2

processCommandMethod · 0.45
postProcessMethod · 0.45

Calls 2

GetWordMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected