comparison osx/include/kj/string.h @ 147:45360b968bf4

Cap'n Proto v0.6 + build for OSX
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 22 May 2017 10:01:37 +0100
parents 41e769c91eca
children
comparison
equal deleted inserted replaced
146:206f0eb279b8 147:45360b968bf4
168 inline ArrayPtr<const char> asArray() const; 168 inline ArrayPtr<const char> asArray() const;
169 inline ArrayPtr<byte> asBytes() { return asArray().asBytes(); } 169 inline ArrayPtr<byte> asBytes() { return asArray().asBytes(); }
170 inline ArrayPtr<const byte> asBytes() const { return asArray().asBytes(); } 170 inline ArrayPtr<const byte> asBytes() const { return asArray().asBytes(); }
171 // Result does not include NUL terminator. 171 // Result does not include NUL terminator.
172 172
173 inline Array<char> releaseArray() { return kj::mv(content); }
174 // Disowns the backing array (which includes the NUL terminator) and returns it. The String value
175 // is clobbered (as if moved away).
176
173 inline const char* cStr() const; 177 inline const char* cStr() const;
174 178
175 inline size_t size() const; 179 inline size_t size() const;
176 // Result does not include NUL terminator. 180 // Result does not include NUL terminator.
177 181