MCPcopy Create free account
hub / github.com/csmith-project/csmith / chop

Method chop

src/StringUtils.cpp:231–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229
230
231void
232StringUtils::chop(string& str)
233{
234 string s;
235 size_t last;
236 while (str[0] == '\t' || str[0] == ' ') {
237 str = str.substr(1);
238 }
239 last = str.length() - 1;
240 while (str[last] == '\t' || str[last] == ' ') {
241 str = str.substr(0, last);
242 last--;
243 }
244}
245
246/*
247 * parse the assignment string into variable-value pairs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected