Go to the documentation of this file.00001 #include <string>
00002
00003 using namespace std;
00004
00005 namespace wibble {
00006 namespace text {
00007
00026 class WordWrap
00027 {
00028 std::string s;
00029 size_t cursor;
00030
00031 public:
00035 WordWrap(const std::string& s) : s(s), cursor(0) {}
00036
00041 void restart() { cursor = 0; }
00042
00046 bool hasData() const { return cursor < s.size(); }
00047
00052 std::string get(unsigned int width);
00053 };
00054
00055 }
00056 }
00057
00058
00059