summaryrefslogtreecommitdiff
path: root/include/lldb/Core/StringList.h
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2014-02-18 16:23:10 +0000
committerEd Maste <emaste@FreeBSD.org>2014-02-18 16:23:10 +0000
commit866dcdacfe59f5f448e008fe2c4cb9dfcf72b2ec (patch)
tree95cb16075f0af1b3a05b9b84eb18dda8e6c903e9 /include/lldb/Core/StringList.h
parentde889deb2c386f2a7831befaf226e5c86685fa53 (diff)
Diffstat (limited to 'include/lldb/Core/StringList.h')
-rw-r--r--include/lldb/Core/StringList.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/include/lldb/Core/StringList.h b/include/lldb/Core/StringList.h
index 5503274173cb1..b68ab4be2d6d5 100644
--- a/include/lldb/Core/StringList.h
+++ b/include/lldb/Core/StringList.h
@@ -34,6 +34,9 @@ public:
AppendString (const std::string &s);
void
+ AppendString (std::string &&s);
+
+ void
AppendString (const char *str);
void
@@ -51,6 +54,34 @@ public:
size_t
GetSize () const;
+ void
+ SetSize (size_t n)
+ {
+ m_strings.resize(n);
+ }
+
+ size_t
+ GetMaxStringLength () const;
+
+ std::string &
+ operator [](size_t idx)
+ {
+ // No bounds checking, verify "idx" is good prior to calling this function
+ return m_strings[idx];
+ }
+
+ const std::string &
+ operator [](size_t idx) const
+ {
+ // No bounds checking, verify "idx" is good prior to calling this function
+ return m_strings[idx];
+ }
+
+ void
+ PopBack ()
+ {
+ m_strings.pop_back();
+ }
const char *
GetStringAtIndex (size_t idx) const;
@@ -64,6 +95,12 @@ public:
LongestCommonPrefix (std::string &common_prefix);
void
+ InsertStringAtIndex (size_t idx, const std::string &str);
+
+ void
+ InsertStringAtIndex (size_t idx, std::string &&str);
+
+ void
InsertStringAtIndex (size_t id, const char *str);
void
@@ -73,11 +110,14 @@ public:
RemoveBlankLines ();
size_t
+ SplitIntoLines (const std::string &lines);
+
+ size_t
SplitIntoLines (const char *lines, size_t len);
std::string
CopyList(const char* item_preamble = NULL,
- const char* items_sep = "\n");
+ const char* items_sep = "\n") const;
StringList&
operator << (const char* str);