MCPcopy Create free account
hub / github.com/acl-dev/acl / pop_end

Method pop_end

lib_acl_cpp/src/stdlib/pipe_stream.cpp:58–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58int pipe_string::pop_end(string* out, size_t max /* = 0 */)
59{
60 if (out == NULL) {
61 return 0;
62 }
63 size_t n = m_pBuf->length();
64 acl_assert(n >= m_pos);
65 n -= m_pos;
66 if (n == 0) {
67 return 0;
68 }
69 if (max > 0 && n > max) {
70 n = max;
71 }
72 out->append(m_pBuf->c_str() + m_pos, n);
73 m_pos += n;
74 return (int) n;
75}
76
77////////////////////////////////////////////////////////////////////////
78

Callers 1

update_endMethod · 0.45

Calls 3

lengthMethod · 0.45
appendMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected