Home | History | Annotate | Download | only in strings

Lines Matching refs:buffer

99 class Buffer {
101 // |buffer| is caller-allocated storage that SafeSPrintf() writes to. It
103 // to ensure that the buffer is at least one byte in size, so that it fits
104 // the trailing NUL that will be added by the destructor. The buffer also
106 Buffer(char* buffer, size_t size)
107 : buffer_(buffer),
127 ~Buffer() {
137 // Returns true, iff the buffer is filled all the way to |kSSizeMax-1|. The
146 // |size_|, if the caller provided an insufficiently large output buffer.
154 // characters that are currently supposed to be in the buffer.
155 // Returns "false", iff the buffer was already full.
164 // |count_| still needs to be updated, even if the buffer has been
250 // Return the current insertion point into the buffer. This is typically
262 // User-provided buffer that will receive the fully formatted output string.
265 // Number of bytes that are available in the buffer excluding the trailing
269 // Number of bytes that would have been emitted to the buffer, if the buffer
274 DISALLOW_COPY_AND_ASSIGN(Buffer);
278 bool Buffer::IToASCII(bool sign, bool upcase, int64_t i, int base,
346 // Make sure there is still enough space left in our output buffer.
398 // padding, but our output buffer is limited in size. Even if we output
433 // Make sure that at least one NUL byte can be written, and that the buffer
445 Buffer buffer(buf, sz);
448 for (unsigned int cur_arg = 0; *fmt && !buffer.OutOfAddressableSpace(); ) {
512 buffer.Pad(' ', padding, 1);
519 buffer.Out(ch);
579 buffer.IToASCII(ch == 'd' && arg.type == Arg::INT,
611 buffer.Pad(' ', padding, len);
615 // output buffer and making sure we don't output more bytes than
618 buffer.Out(*src++);
638 buffer.Out('%');
643 buffer.Out(ch);
648 buffer.Out(fmt[-1]);
653 return buffer.GetCount();
659 // Make sure that at least one NUL byte can be written, and that the buffer
669 Buffer buffer(buf, sz);
677 buffer.Out(*src);
683 return buffer.GetCount();