INTEGRATION: CWS adc8 (1.8.16); FILE MERGED

2004/07/01 13:54:23 np 1.8.16.1: #i30968# Implement csv::StreamStr strip-functions. Also some general cosv maintenance. Fixing the bug with directory attributes in ploc_dir.cxx. Updating documentation. Making string classes 64-bit compatible by replacing UINT32 by ::size_t for the strings size- and position-type.
This commit is contained in:
Rüdiger Timm 2004-07-12 14:48:01 +00:00
parent 1371129129
commit f414ac1343

View file

@ -2,9 +2,9 @@
*
* $RCSfile: streamstr.cxx,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: obo $ $Date: 2004-02-20 09:30:06 $
* last change: $Author: rt $ $Date: 2004-07-12 15:48:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -541,6 +541,60 @@ StreamStr::operator_read_line( bstream & i_src )
return *this;
}
void
StreamStr::strip_front(char i_cToRemove)
{
const_iterator it = begin();
for ( ;
it != end() ? *it == i_cToRemove : false;
++it );
pop_front(it - begin());
}
void
StreamStr::strip_back(char i_cToRemove)
{
const_iterator it = end();
for ( ;
it != begin() ? *(it-1) == i_cToRemove : false;
--it );
pop_back(end() - it);
}
void
StreamStr::strip_frontback(char i_cToRemove)
{
strip_front(i_cToRemove);
strip_back(i_cToRemove);
}
void
StreamStr::strip_front_whitespace()
{
const_iterator it = begin();
for ( ;
it != end() ? *it < 33 : false;
++it );
pop_front(it - begin());
}
void
StreamStr::strip_back_whitespace()
{
const_iterator it = end();
for ( ;
it != begin() ? *(it-1) < 33 : false;
--it );
pop_back(end() - it);
}
void
StreamStr::strip_frontback_whitespace()
{
strip_front_whitespace();
strip_back_whitespace();
}
void
StreamStr::replace( position_type i_nStart,
size_type i_nSize,