14#include "llvm/ADT/ArrayRef.h"
30 for (
int i = 0; i < strc; ++i) {
51 m_strings.push_back(std::string(str, str_len));
63 for (
int i = 0; i < strc; ++i) {
77 size_t max_length = 0;
79 const size_t len = s.size();
98 for (uint32_t i = 0; i < size; ++i) {
112 llvm::StringRef prefix = args.front();
113 for (
auto arg : args.drop_front()) {
115 for (count = 0; count < std::min(prefix.size(), arg.size()); ++count) {
116 if (prefix[count] != arg[count])
119 prefix = prefix.take_front(count);
157 const size_t orig_size =
m_strings.size();
162 const char *k_newline_chars =
"\r\n";
163 const char *p = lines;
164 const char *
end = lines + len;
166 size_t count = strcspn(p, k_newline_chars);
168 if (p[count] ==
'\r' || p[count] ==
'\n')
175 m_strings.push_back(std::string(p, count));
177 if (p[count] ==
'\r' && p[count + 1] ==
'\n')
199 const char *items_sep)
const {
201 for (
size_t i = 0; i <
GetSize(); i++) {
202 if (i && items_sep && items_sep[0])
205 strm << item_preamble;
227 m_strings.assign(rhs.begin(), rhs.end());
238 strm.
Printf(
"Begin %s:\n", name);
241 strm.
Printf(
"%s\n", s.c_str());
244 strm.
Printf(
"End %s.\n", name);
#define LLDB_LOGV(log,...)
const char * GetData() const
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
size_t GetMaxStringLength() const
void AppendList(const char **strv, int strc)
virtual void LogDump(Log *log, const char *name=nullptr)
std::string CopyList(const char *item_preamble=nullptr, const char *items_sep="\n") const
size_t SplitIntoLines(const std::string &lines)
void AppendString(const std::string &s)
const char * GetStringAtIndex(size_t idx) const
StringList & operator<<(const char *str)
StringList & operator=(const std::vector< std::string > &rhs)
void InsertStringAtIndex(size_t idx, const std::string &str)
void DeleteStringAtIndex(size_t id)
void Join(const char *separator, Stream &strm)
std::string LongestCommonPrefix()
A class that represents a running process on the host machine.