1 //===-- StringList.h --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_StringList_h_
11 #define liblldb_StringList_h_
15 #include "lldb/Core/STLUtils.h"
16 #include "lldb/lldb-forward.h"
18 namespace lldb_private {
26 StringList (const char *str);
28 StringList (const char **strv, int strc);
34 AppendString (const std::string &s);
37 AppendString (const char *str);
40 AppendString (const char *str, size_t str_len);
43 AppendList (const char ** strv, int strc);
46 AppendList (StringList strings);
49 ReadFileLines (FileSpec &input_file);
55 GetStringAtIndex (size_t idx) const;
58 Join (const char *separator, Stream &strm);
64 LongestCommonPrefix (std::string &common_prefix);
67 InsertStringAtIndex (size_t id, const char *str);
70 DeleteStringAtIndex (size_t id);
76 SplitIntoLines (const char *lines, size_t len);
79 CopyList(const char* item_preamble = NULL,
80 const char* items_sep = "\n");
83 operator << (const char* str);
86 operator << (StringList strings);
88 // This string list contains a list of valid auto completion
89 // strings, and the "s" is passed in. "matches" is filled in
90 // with zero or more string values that start with "s", and
91 // the first string to exactly match one of the string
92 // values in this collection, will have "exact_matches_idx"
93 // filled in to match the index, or "exact_matches_idx" will
96 AutoComplete (const char *s,
98 size_t &exact_matches_idx) const;
102 STLStringArray m_strings;
105 } // namespace lldb_private
107 #endif // liblldb_StringList_h_