diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-11 16:03:50 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-11 17:02:25 -0400 |
commit | dea2aed0b509734ec4e1cd163ac2a4f013000da2 (patch) | |
tree | 7908da76c67ae5172882306a319bf26df81b73b4 /src/unistring.h | |
parent | d580079df892c30d023b3211d6c4611c17b11f8f (diff) | |
download | fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.gz fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.bz2 fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.zip |
Untabified all source files
Diffstat (limited to 'src/unistring.h')
-rw-r--r-- | src/unistring.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/unistring.h b/src/unistring.h index d42f2b28..979ce08b 100644 --- a/src/unistring.h +++ b/src/unistring.h @@ -67,7 +67,7 @@ public: TRACE_CTOR(unistring, "std::string"); const char * p = input.c_str(); - std::size_t len = input.length(); + std::size_t len = input.length(); VERIFY(utf8::is_valid(p, p + len)); utf8::unchecked::utf8to32(p, p + len, std::back_inserter(utf32chars)); @@ -81,9 +81,9 @@ public: } std::string extract(const std::string::size_type begin = 0, - const std::string::size_type len = 0) const + const std::string::size_type len = 0) const { - std::string utf8result; + std::string utf8result; std::string::size_type this_len = length(); assert(begin <= this_len); @@ -91,10 +91,10 @@ public: if (this_len) utf8::unchecked::utf32to8 - (utf32chars.begin() + begin, - utf32chars.begin() + begin + - (len ? (len > this_len ? this_len : len) : this_len), - std::back_inserter(utf8result)); + (utf32chars.begin() + begin, + utf32chars.begin() + begin + + (len ? (len > this_len ? this_len : len) : this_len), + std::back_inserter(utf8result)); return utf8result; } @@ -103,7 +103,7 @@ public: std::size_t idx = 0; foreach (const boost::uint32_t& ch, utf32chars) { if (idx >= __pos && ch == __s) - return idx; + return idx; idx++; } return npos; @@ -118,10 +118,10 @@ public: }; inline void justify(std::ostream& out, - const std::string& str, - int width, - bool right = false, - bool redden = false) + const std::string& str, + int width, + bool right = false, + bool redden = false) { if (! right) { if (redden) out << "\033[31m"; |