16std::string
mbs_substr_by_width( boost::string_ref text_r, std::string::size_type colpos_r, std::string::size_type collen_r )
21 const char * spos =
nullptr;
24 size_t colend = ( collen_r == std::string::npos ? std::string::npos : colpos_r+collen_r );
30 size_t end = pos + it.columns();
35 ret += std::string( std::min(end,colend)-colpos_r,
' ' );
49 ret += std::string( spos, slen );
53 ret += std::string( colend-pos,
' ' );
63 ret += std::string( spos, slen );
std::string mbs_substr_by_width(boost::string_ref text_r, std::string::size_type colpos_r, std::string::size_type collen_r)
Returns a substring of a multi-byte character string text_r starting at screen column cpos_r and bein...