2010-03-24から1日間の記事一覧

drop_while_string

C++

basic_string::find_first_not_ofを単純にラップした関数です。 一致しなかった最初の位置ではなく、先頭から一致した部分を取り除いた文字列を返します。 #include <string> template <class CharT, class Alloc, class Target> std::basic_string<CharT, Alloc> drop_while_string(const std::basic_string<CharT, Alloc>& src, const Ta</chart,></chart,></class></string>…