str.cpp

changeset 107
195aa036da7f
parent 104
6e29bb0e83c5
child 113
bbaa40226ec9
equal deleted inserted replaced
106:46e4202a44fc 107:195aa036da7f
283 append (s2); 283 append (s2);
284 } 284 }
285 } 285 }
286 286
287 // ============================================================================ 287 // ============================================================================
288 // It works otherwise but I'm having trouble with the initializer_list
289 /*
290 void str::strip (char c) { 288 void str::strip (char c) {
291 strip ({c}); 289 strip ({c});
292 } 290 }
293 291
294 void str::strip (std::initializer_list<char> unwanted) { 292 void str::strip (std::initializer_list<char> unwanted) {
313 clear(); 311 clear();
314 append (buf); 312 append (buf);
315 313
316 delete[] buf; 314 delete[] buf;
317 } 315 }
318 */
319 316
320 void str::insert (char* c, unsigned int pos) { 317 void str::insert (char* c, unsigned int pos) {
321 str s1 = substr (0, pos); 318 str s1 = substr (0, pos);
322 str s2 = substr (pos, len()); 319 str s2 = substr (pos, len());
323 320

mercurial