diff options
author | FreeArtMan <dos21h@gmail.com> | 2019-05-12 15:05:57 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2019-05-12 15:05:57 +0100 |
commit | 082dee0658b67744ab3428eea964f375f7aab9dc (patch) | |
tree | 6dd58d5044513ec7bef3b445fefa7003e33ebeed /buf_misc.c | |
parent | 654bb8b09dd90c12c3a51ffdce800b2255b753b5 (diff) | |
download | libbuf-082dee0658b67744ab3428eea964f375f7aab9dc.tar.gz libbuf-082dee0658b67744ab3428eea964f375f7aab9dc.zip |
Added more functionality to Buf, substring, search for characer, and shifting string.
Diffstat (limited to 'buf_misc.c')
-rw-r--r-- | buf_misc.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -57,21 +57,26 @@ int bbuf_line_free(bbuf_line *buf) BufLine::BufLine(int size) { - *buf = Buf(size); + buf = new Buf(size); sep=0x0; memset(pattern,0,BUF_PATTER_SIZE); } BufLine::~BufLine() { - delete buf; + } -int BufLine::set_pattern(char *pattern) +int BufLine::setpattern(char *pattern) { return -1; } +int BufLine::setseperator(char s) +{ + this->sep = s; + return 0; +} int BufLine::add(char *string, int size) { @@ -86,6 +91,13 @@ int BufLine::add(Buf *newdata) int BufLine::pop_line(char **val, int *size) { + + return -1; +} + +int BufLine::print() +{ + buf->print(); return -1; } |