![]() |
String Adaptor is Range Adaptor for strings.
broken_into
is a range
adaptor version of boost::tokenizer
.
<pstade/oven/broken_into.hpp>
Valid expression |
Semantics |
---|---|
|
A Major Function Object type |
|
|
|
|
k
is a TokenizerFunction.
T
is boost::token_iterator<_typeof(k),
_iter_of<_typeof(_rng)>::type, V>
such that T(k, _begin(_rng), _end(_rng))
is a valid expression.
int const offsets[] = { 2,2,4 }; std::string src("12252001"); std::vector<std::string> ans; { ans.push_back("12"); ans.push_back("25"); ans.push_back("2001"); } BOOST_CHECK( equals( ans, src|oven::broken_into<std::string>(boost::offset_separator(offsets, offsets+3)) ) );
lower_chars
performs case-conversion
on all characters in the base range.
<pstade/oven/lower_chars.hpp>
loc
is a std::locale
object.
to_l
is an imaginary function
object to call std::tolower
using loc
.
Valid expression |
Semantics |
---|---|
|
|
|
|
std::tolower(*boost::begin(_rng), loc)
is well-formed.
BOOST_CHECK( equals( std::string("AbCdEFG")|lower_chars, std::string("abcdefg") ) );
upper_chars
performs case-conversion
on all characters in the base range.
<pstade/oven/upper_chars.hpp>
loc
is a std::locale
object.
to_u
is an imaginary function
object to call std::toupper
using loc
.
Valid expression |
Semantics |
---|---|
|
|
|
|
std::toupper(*boost::begin(_rng), loc)
is well-formed.
BOOST_CHECK( equals( std::string("AbCdEFG")|upper_chars, std::string("ABCDEFG") ) );
<pstade/oven/narrow_chars.hpp>
loc
is a std::locale
object.
to_n
is an imaginary function
object to call narrow
using
loc
.
Valid expression |
Semantics |
---|---|
|
|
|
|
std::use_facet<
std::ctype<_value_of<_typeof(_rng)>::type> >(loc).narrow(*boost::begin(_rng))
is well-formed.
<pstade/oven/wide_chars.hpp>
loc
is a std::locale
object.
to_w
is an imaginary function
object to call widen
using
loc
.
Valid expression |
Semantics |
---|---|
|
|
|
|
|
|
std::use_facet<
std::ctype<CharT> >(loc).widen(*boost::begin(_rng))
is well-formed.
string_found
returns a boost::find_iterator
range.
<pstade/oven/string_found.hpp>
Valid expression |
Semantics |
---|---|
|
|
f
is a Finder.
T
is boost::find_iterator<_iter_of<_typeof(_rng)>::type>
such that T(_rng, f)
is a valid expression.
string_split
returns a boost::split_iterator
range.
<pstade/oven/string_split.hpp>
Valid expression |
Semantics |
---|---|
|
|
f
is a Finder.
T
is boost::split_iterator<_iter_of<_typeof(_rng)>::type>
such that T(_rng, f)
is a valid expression.
matches
returns a boost::regex_iterator
range.
<pstade/oven/matches.hpp>
Valid expression |
Semantics |
---|---|
|
A Major Function Object type |
|
|
|
|
T
is boost::regex_iterator<_iter_of<_typeof(_bidrng)>::type, X1,...,XN>
such that T(_begin(_bidrng), _end(_bidrng), y0,...,yM)
is a valid expression.
matches
range is not Parallel Safe.
tokenized
returns a boost::regex_token_iterator
range.
<pstade/oven/tokenized.hpp>
Valid expression |
Semantics |
---|---|
|
A Major Function Object type |
|
|
|
|
T
is boost::regex_token_iterator<_iter_of<_typeof(_bidrng)>::type, Y1,...,YN>
such that T(_begin(_bidrng), _end(_bidrng), x1,...,xM)
is a valid expression.
tokenized
range is not Parallel Safe.
Pending...
<pstade/oven/utf8_decoded.hpp>
Valid expression |
Semantics |
---|---|
|
A Major Function Object type |
|
An up-to-Bidirectional
non-Lvalue
Constant |
|
|
_fwdrng
is Readable.
T
is boost::u8_to_u32_iterator<_iter_of<_typeof(_fwdrng)>::type, U1,...,UN>
such that T(_begin(_fwdrng))
is a valid expression.
file_range<boost::uint8_t> frng("utf8.txt"); std::vector<boost::uint8_t> result; copy(frng|utf8_decoded, utf8_encoder|=back_inserter(result)); BOOST_CHECK( equals(frng, result) );
Pending...
<pstade/oven/utf8_encoded.hpp>
Valid expression |
Semantics |
---|---|
|
A Major Function Object type |
|
An up-to-Bidirectional
non-Lvalue
Constant |
|
|
_rng
is Readable.
T
is boost::u32_to_u8_iterator<_iter_of<_typeof(_rng)>::type, U1,...,UN>
such that T(_begin(_rng))
is a valid expression.
Pending...
<pstade/oven/utf16_decoded.hpp>
Valid expression |
Semantics |
---|---|
|
A Major Function Object type |
|
An up-to-Bidirectional
non-Lvalue
Constant |
|
|
_fwdrng
is Readable.
T
is boost::u16_to_u32_iterator<_iter_of<_typeof(_fwdrng)>::type, U1,...,UN>
such that T(_begin(_fwdrng))
is a valid expression.
Pending...
<pstade/oven/utf16_encoded.hpp>
Valid expression |
Semantics |
---|---|
|
A Major Function Object type |
|
An up-to-Bidirectional
non-Lvalue
Constant |
|
|
_rng
is Readable.
T
is boost::u32_to_u16_iterator<_iter_of<_typeof(_rng)>::type, U1,...,UN>
such that T(_begin(_rng))
is a valid expression.
xpressive_matches
returns
a boost::xpressive::regex_iterator
range.
<pstade/oven/xpressive_matches.hpp>
Valid expression |
Semantics |
---|---|
|
|
T
is boost::xpressive::regex_iterator<boost::range_const_iterator<_typeof(_bidrng)>::type>
such that T(_begin(_bidrng), _end(_bidrng), x1,...,xN)
is a valid expression.
xpressive_matches
range is not Parallel Safe.
xpressive_tokenized
returns
a boost::xpressive::regex_token_iterator
range.
<pstade/oven/xpressive_tokenized.hpp>
Valid expression |
Semantics |
---|---|
|
|
T
is boost::xpressive::regex_token_iterator<boost::range_const_iterator<_typeof(_bidrng)>::type>
such that T(_begin(_bidrng), _end(_bidrng), x1,...,xN)
is a valid expression.
xpressive_tokenized
range is not Parallel Safe.
Copyright © 2005 -2007 Shunsuke Sogame |