Utility for scanning text segments.
More...
#include <TextReader.h>
|
template<> |
char | scanSegmentToValue (std::istream &istr, const std::string &endChars, std::string &dst) |
|
|
static std::string | scanSegment (std::istream &istr, const std::string &endChars) |
| Read input stream until any char in endChars is encountered. The end char will not be included, but passed in input stream. More...
|
|
static char | scanSegment (std::istream &istr, const std::string &endChars, std::ostream &ostr) |
| Read input stream until any char in endChars is encountered. The end char will not be included, but passed in input stream. More...
|
|
template<class T > |
static char | scanSegmentToValue (std::istream &istr, const std::string &endChars, T &dst) |
|
static char | skipChars (std::istream &istr, const std::string skipChars) |
| Read stream until a char not in skipChars or end-of-file is encountered. More...
|
|
static char | skipWhiteSpace (std::istream &istr) |
|
Utility for scanning text segments.
◆ scanSegment() [1/2]
static std::string scanSegment |
( |
std::istream & |
istr, |
|
|
const std::string & |
endChars |
|
) |
| |
|
inlinestatic |
Read input stream until any char in endChars
is encountered. The end char will not be included, but passed in input stream.
Typically, used for reading variable values, including nested segments, hence recognizing closing chars.
◆ scanSegment() [2/2]
char scanSegment |
( |
std::istream & |
istr, |
|
|
const std::string & |
endChars, |
|
|
std::ostream & |
ostr |
|
) |
| |
|
static |
Read input stream until any char in endChars
is encountered. The end char will not be included, but passed in input stream.
- Returns
- -
end
char that was found; else null
char, esp at end-of-file
.
◆ scanSegmentToValue()
char scanSegmentToValue |
( |
std::istream & |
istr, |
|
|
const std::string & |
endChars, |
|
|
T & |
dst |
|
) |
| |
|
static |
- Returns
- -
end
char that was found; else null
char, esp at end-of-file
.
◆ skipChars()
char skipChars |
( |
std::istream & |
istr, |
|
|
const std::string |
skipChars |
|
) |
| |
|
static |
Read stream until a char not in skipChars
or end-of-file is encountered.
- Returns
- – the last char skipped, else null char.
◆ skipWhiteSpace()
static char skipWhiteSpace |
( |
std::istream & |
istr | ) |
|
|
inlinestatic |
- Returns
- - the last whitespace char skipped, else null char.
The documentation for this class was generated from the following files: