21#ifndef G_STRING_WRAP_H
22#define G_STRING_WRAP_H
39 static std::string
wrap(
const std::string & text ,
40 const std::string & prefix_first ,
const std::string & prefix_other ,
41 std::size_t width_first = 70U , std::size_t width_other = 0U ,
42 bool preserve_spaces =
false ,
const std::locale & =
defaultLocale() ) ;
63 static std::size_t
wordsize(
const std::string & mbcs ,
const std::locale & ) ;
Private implementation structure for G::StringWrap.
static std::locale defaultLocale()
Returns a locale with at least the CTYPE and codecvt facets initialised according to the C locale's C...
static std::size_t wordsize(const std::string &mbcs, const std::locale &)
Returns the number of wide characters after converting the input string using the locale's codecvt fa...
static std::string wrap(const std::string &text, const std::string &prefix_first, const std::string &prefix_other, std::size_t width_first=70U, std::size_t width_other=0U, bool preserve_spaces=false, const std::locale &=defaultLocale())
Does word-wrapping.
A class template like c++17's std::basic_string_view.
Private implementation structure for G::StringWrap.