117 template<
class charT>
129 template<
class charT>
131 std::basic_string<charT>(n,c)
147 template<
class charT>
155 if (!A.size())
return;
161 assert(
static_cast<typename std::basic_string<charT>::size_type
>(pos)<A.size());
166 (
static_cast<typename std::basic_string<charT>::size_type
>(numpos)<=(A.size()-pos))
178 std::basic_string<charT>::operator=(std::basic_string<charT>(A,pos,numpos));
183 template<
class charT>
194 template<
class charT>
197 std::basic_string<charT>::operator=(A);
207 template<
class charT>
211 size_t searchstr_size = searchstr.size();
212 size_t insstr_size = insstr.size();
213 size_t start_pos = 0;
215 while (start_pos != std::string::npos)
217 start_pos = this->find (searchstr, start_pos);
218 if (start_pos && start_pos != std::string::npos)
220 this->insert (start_pos, insstr);
221 start_pos += searchstr_size + insstr_size;
232 template<
class charT>
240 while (oldpos < (
size_t)this->nelem() &&
243 if (pos && pos-oldpos) aos.push_back(this->substr(oldpos, pos-oldpos));
244 oldpos = pos+delim.
nelem();
247 if (oldpos < (
size_t)this->nelem()) aos.push_back(this->substr(oldpos));
252 template<
class charT>
259 while (0 != this_string.
nelem()
260 && (
' ' == this_string[0]
261 ||
'\t' == this_string[0]
262 ||
'\n' == this_string[0]
263 ||
'\r' == this_string[0]))
264 this_string.erase(0,1);
267 while (0 != this_string.
nelem()
268 && (
' ' == this_string[this_string.
nelem()-1]
269 ||
'\t' == this_string[this_string.
nelem()-1]
270 ||
'\n' == this_string[this_string.
nelem()-1]
271 ||
'\r' == this_string[this_string.
nelem()-1]))
272 this_string.erase(this_string.
nelem()-1);
277 template<
class charT>
280 size_t s = this->size();
282 return static_cast<long>(s);
292 template<
class charT>
297 return std::basic_string<charT>::operator[](n);
307 template<
class charT>
312 return std::basic_string<charT>::operator[](n);
344 std::istringstream item( line.substr(0,n) );