summaryrefslogtreecommitdiff
path: root/indra/llcommon/llnametable.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-02-24 15:06:44 -0500
committerNat Goodspeed <nat@lindenlab.com>2012-02-24 15:06:44 -0500
commit025329b6a2ecb8ddee3022d6a73344f862f0d326 (patch)
treed383364dafa59827a3336b929600416e2c839bf0 /indra/llcommon/llnametable.h
parent14ddc6474a0ae83db8d034b00138289fb15e41b7 (diff)
Add LLStringUtil::getTokens() overload handling quoted substrings.
We didn't have any tokenizer suitable for scanning something like a bash command line. We do have a couple hacks, e.g. LLExternalEditor::tokenize() and LLCommandLineParser::parseCommandLineString(). Both try to work around boost::tokenizer limitations; but existing boost::tokenizer support just doesn't address this case. Neither of the above is available as a general scanner anyway, and parseCommandLineString() fails outright when passed "". New getTokens() also distinguishes between "drop delimiters" (e.g. space, return, newline) to be discarded from the token stream, versus "keep delimiters" (e.g. "+-*/") to be returned as tokens in their own right. There's an overload that honors escapes and a more efficient one that doesn't; each has a convenience overload that returns the scanned string vector rather than requiring a separate declaration. Tweak and comment older getTokens() implementation. Add unit tests for both old and new getTokens() implementations. Break out StringVec and std::ostream << StringVec from indra/llcommon/tests/listener.h to StringVec.h: that's coming in handy for a number of different TUT test sources.
Diffstat (limited to 'indra/llcommon/llnametable.h')
0 files changed, 0 insertions, 0 deletions