One trick is to pay tribute to Great Boost.
Specific batch rules:
The telephone number or anything else can be separated by the following four symbols:
Semicolon, for example, 1391067; 62963517, or 1391067; 62963 ;.
Comma, for example, 1391067,62963517, or 1391067,62963 ,.
Chinese semicolon, such as: 1391067; 62963, or 1391067; 629637 ;.
Chinese comma, for example, 1391067,62963, or 1391067,629617 ,.
You can also mix these four symbols, such:
1391067,6617; 62980; 1234,5678; 9900,0099;
. And so on.
In this way, the tokenizer of the boost library can be easily used.
Batch code:
# Include <boost/tokenizer. hpp>
# Include <string>
...
Std: string _ incluenfaxnumber ("629780; 038520,03851293; 1234,5678; 8989 ");
Typedef boost: tokenizer <boost: char_separator <char>
Tokenizer;
// Wholesale separator number, enumerating various symbols:
Boost: char_separator <char> sep (";,;,");
Tokenizer tokens (_ incluenfaxnumber, sep );
Tokenizer: const_iterator itBegin = tokens. begin ();
Tokenizer: const_iterator itEnd = tokens. end ();
Tokenizer: iterator tok_iter;
For (tok_iter = itBegin;
Tok_iter! = ItEnd;
++ Tok_iter)
{
_ Bstr_t bstrSingleFax (* tok_iter). c_str ());
}