From 3bb040043c0241f911aacc234bab16737b2e8f19 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 12 Feb 2011 20:15:57 +0200 Subject: hopefully a fix for the majority of the windows 7 problems - thanks to zerochen --- src/utility.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/utility.h') diff --git a/src/utility.h b/src/utility.h index b3816c8a7..46277cd42 100644 --- a/src/utility.h +++ b/src/utility.h @@ -1686,6 +1686,22 @@ inline bool string_allowed(const std::string &s, const std::string &allowed_char return true; } +/* + Forcefully wraps string into rows using \n + (no word wrap, used for showing paths in gui) +*/ +inline std::string wrap_rows(const std::string &from, u32 rowlen) +{ + std::string to; + for(u32 i=0; i