summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/format.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-04-03 22:08:04 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-04-04 00:23:48 +0200
commit09b5222a26359a00371d394ac2fa9d09d6a176e5 (patch)
tree93d67b1785ae3940dea8867200051e6d830f4f79 /crawl-ref/source/format.h
parentaaf14668dd8f23ae0cb125f33c57be951ae03f8f (diff)
downloadcrawl-ref-09b5222a26359a00371d394ac2fa9d09d6a176e5.tar.gz
crawl-ref-09b5222a26359a00371d394ac2fa9d09d6a176e5.zip
formatted_string fixes.
Used by, among others, message history, so user-supplied strings can happen.
Diffstat (limited to 'crawl-ref/source/format.h')
-rw-r--r--crawl-ref/source/format.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/format.h b/crawl-ref/source/format.h
index 74cb73a9f0..decce064fe 100644
--- a/crawl-ref/source/format.h
+++ b/crawl-ref/source/format.h
@@ -29,7 +29,8 @@ public:
void cprintf(const std::string &s);
void add_glyph(glyph g);
void textcolor(int color);
- formatted_string substr(size_t index, size_t length=std::string::npos) const;
+ formatted_string chop(int length) const;
+ void del_char();
void all_caps();
void clear();
@@ -37,7 +38,7 @@ public:
void swap(formatted_string& other);
- std::string::size_type length() const;
+ int width() const;
std::string html_dump() const;
bool operator < (const formatted_string &other) const;