| 626 | typename alloc |
| 627 | > |
| 628 | const std::basic_string<charT,traits,alloc> rtrim ( |
| 629 | const std::basic_string<charT,traits,alloc>& str, |
| 630 | const std::basic_string<charT,traits,alloc>& trim_chars |
| 631 | ) |
| 632 | { |
| 633 | typedef std::basic_string<charT,traits,alloc> string; |
| 634 | |
| 635 | typename string::size_type pos = str.find_last_not_of(trim_chars); |
| 636 | if (pos != string::npos) |
| 637 | return str.substr(0,pos+1); |
| 638 | else |
| 639 | return std::basic_string<charT,traits,alloc>(); |
| 640 | } |
| 641 | |
| 642 | template < |
| 643 | typename charT, |