108 template<
class charT>
119 template<
class charT>
121 basic_string<charT>(n,c)
141 template<
class charT>
153 assert(
static_cast<typename basic_string<charT>::size_type
>(pos)<A.size());
158 (
static_cast<typename basic_string<charT>::size_type
>(numpos)<=(A.size()-pos))
170 basic_string<charT>::operator=(basic_string<charT>(A,pos,numpos));
175 template<
class charT>
186 template<
class charT>
189 basic_string<charT>::operator=(A);
198 template<
class charT>
202 size_t searchstr_size = searchstr.size();
203 size_t insstr_size = insstr.size();
204 size_t start_pos = 0;
206 while (start_pos != string::npos)
208 start_pos = this->find (searchstr, start_pos);
209 if (start_pos && start_pos != string::npos)
211 this->insert (start_pos, insstr);
212 start_pos += searchstr_size + insstr_size;
222 template<
class charT>
230 while (oldpos < (
size_t)this->nelem() &&
233 if (pos) aos.push_back(this->substr(oldpos, pos-oldpos));
234 oldpos = pos+delim.
nelem();
237 if (oldpos < (
size_t)this->nelem()) aos.push_back(this->substr(oldpos));
241 template<
class charT>
244 size_t s = this->size();
246 return static_cast<long>(s);
255 template<
class charT>
260 return basic_string<charT>::operator[](n);
269 template<
class charT>
274 return basic_string<charT>::operator[](n);