Attention
This functionality is only available in the C++ toolkits. For other languages, we recommend using language-specific functionality instead.
OEStringTokenize¶
bool OEStringTokenize(std::list<std::string> &strgrp, const std::string &str,
const std::string & delim = " \t\n", bool concat_delim=true)
bool OEStringTokenize(std::vector<std::string> &strgrp, const std::string &str,
const std::string & delim = " \t\n", bool concat_delim=true)
Break ups the specified input string (‘str’) into
individual tokens based on the specified delimiters (‘delim’). The
resulting tokens are stored in the specified string group
(strgrp). This function always returns true
. If concat_delim
is true
, the default, consecutive delimiters will be treated as
a single delimiter. For example, for parsing CSV files concat_delim
should be set to false
to allow for empty fields.
See also
Example program CSV2SDF.java