From: wolf Date: Thu, 8 Sep 2005 23:56:45 +0000 (+0000) Subject: break_text_into_lines X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46094a57665514905a2125d0d7c11a0eb19717a6;p=dealii-svn.git break_text_into_lines git-svn-id: https://svn.dealii.org/trunk@11376 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/utilities.h b/deal.II/base/include/base/utilities.h index a3f66a3ac2..c154052883 100644 --- a/deal.II/base/include/base/utilities.h +++ b/deal.II/base/include/base/utilities.h @@ -78,6 +78,20 @@ namespace Utilities split_string_list (const std::string &s, const char delimiter = ','); + /** + * Take a text, usually a documentation or + * something, and try to break it into + * individual lines of text at most @p + * width characters wide, by breaking at + * spaces in the text. If this is not + * possible, return the shortest lines than + * are longer than @p width. + */ + std::vector + break_text_into_lines (const std::string &original_text, + const unsigned int width); + + /** * Generate a random number from a * normalized Gaussian probability