teditor
1.8.0@@fee5e94
Terminal based editor written in C++
|
Go to the documentation of this file.
19 void append(
char c) { line.push_back(c); }
20 void append(
const char* c) { line += c; }
21 void append(
const std::string& str) { line += str; }
24 void prepend(
char c,
int count);
25 void insert(
char c,
int idx);
26 void insert(
const char* c,
int idx);
27 void insert(
const std::string& str,
int idx);
31 std::string
erase(
int idx,
int len=1);
45 bool empty()
const {
return line.empty(); }
48 int length()
const {
return (
int)line.length(); }
51 const std::string&
get()
const {
return line; }
54 char at(
int idx)
const {
return line[idx]; }
int indentSize() const
Definition: line.cpp:68
void prepend(const char *c)
Definition: line.h:23
Line split(int idx)
Definition: line.cpp:15
const std::string & get() const
Definition: line.h:51
int numLinesNeeded(int wid) const
Definition: line.cpp:49
bool empty() const
Definition: line.h:45
std::string erase(int idx, int len=1)
Definition: line.cpp:7
char at(int idx) const
Definition: line.h:54
void append(const std::string &str)
Definition: line.h:21
void clear()
Definition: line.h:57
void append(const char *c)
Definition: line.h:20
int length() const
Definition: line.h:48
Line()
Definition: line.h:13
void insert(char c, int idx)
Definition: line.cpp:34
int findLastNotOf(const std::string &str, int pos) const
Definition: line.cpp:62
void prepend(char c)
Definition: line.h:22
void append(char c)
Definition: line.h:19
int findFirstNotOf(const std::string &str, int pos) const
Definition: line.cpp:56
bool LineCompare(const Line &a, const Line &b)
Definition: line.cpp:75
void join(const Line &other)
Definition: line.cpp:25