MCPcopy Create free account
hub / github.com/NeuralNetworkVerification/Marabou / tokenize

Method tokenize

src/common/MString.cpp:111–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111List<String> String::tokenize( String delimiter ) const
112{
113 List<String> tokens;
114
115 Vector<char> copyVector( length() + 1 );
116 char *copy( copyVector.data() );
117 memcpy( copy, ascii(), sizeof( char ) * ( length() + 1 ) );
118
119 char *token = strtok( copy, delimiter.ascii() );
120
121 while ( token != NULL )
122 {
123 tokens.append( String( token ) );
124 token = strtok( NULL, delimiter.ascii() );
125 }
126
127 return tokens;
128}
129
130bool String::contains( const String &substring ) const
131{

Callers 15

processSingleLineMethod · 0.80
parseRowMethod · 0.80
parseColumnMethod · 0.80
parseRhsMethod · 0.80
parseBoundsMethod · 0.80
parseDeclareConstMethod · 0.80
processReluLineMethod · 0.80
processEquationLineMethod · 0.80
mainFunction · 0.80
loadQueryMethod · 0.80
LeakyReluConstraintMethod · 0.80
SoftmaxConstraintMethod · 0.80

Calls 3

asciiMethod · 0.80
StringClass · 0.70
appendMethod · 0.45

Tested by 2

test_tokenizeMethod · 0.64