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