| 627 | |
| 628 | |
| 629 | bool cByteBuffer::WriteVarUTF8String(const AString & a_Value) |
| 630 | { |
| 631 | CHECK_THREAD; |
| 632 | CheckValid(); |
| 633 | PUTBYTES(a_Value.size() + 1); // This is a lower-bound on the bytes that will be actually written. Fail early. |
| 634 | bool res = WriteVarInt(a_Value.size()); |
| 635 | if (!res) |
| 636 | { |
| 637 | return false; |
| 638 | } |
| 639 | return WriteBuf(a_Value.data(), a_Value.size()); |
| 640 | } |
| 641 | |
| 642 | |
| 643 |
no test coverage detected