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

Method Substring

avida-core/source/tools/cString.cc:290–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288
289
290cString cString::Substring(int start, int size) const
291{
292 assert(size >= 0); // Non-Positive Size
293 assert(start >= 0); // Negative Position
294 assert(start + size <= GetSize()); // Position+Size Past End of String
295
296 cString new_string(size);
297 for (int i=0; i<size; i++) {
298 new_string[i] = (*this)[i+start];
299 }
300 return new_string;
301}
302
303bool cString::IsSubstring(const cString & in_string, int start) const
304{

Callers 14

processCommandMethod · 0.80
parseExprP6Method · 0.80
OutputIDFromPathMethod · 0.80
InstructionSequenceMethod · 0.80
GetProvidedValueMethod · 0.80
DescribeMethod · 0.80
AttachRecorderMethod · 0.80
GetCurrentValueMethod · 0.80
SetReactionValueMethod · 0.80
cBaseConfigEntryMethod · 0.80
FreezerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected