class StringFile

Defined at line 19 of file ../../zircon/kernel/lib/libc/include/string-file.h

FILE* wrapper over a string.

Public Methods

void StringFile ()

Defined at line 21 of file ../../zircon/kernel/lib/libc/include/string-file.h

void StringFile (const StringFile & )

Defined at line 22 of file ../../zircon/kernel/lib/libc/include/string-file.h

StringFile operator= (const StringFile & )

Defined at line 23 of file ../../zircon/kernel/lib/libc/include/string-file.h

ktl::span<char> take ()

Adds a null character at the end of the current buffer and returns a view

into the written section.

Defined at line 23 of file ../../zircon/kernel/lib/libc/string-file.cc

int Write (ktl::string_view str)

Returns |str.size()| and writes as much of |str| as it would fit in the

buffer [offest_, size - 1) while reserving the last byte for null

character.

Defined at line 15 of file ../../zircon/kernel/lib/libc/string-file.cc

void StringFile (ktl::span<char> s)

Defined at line 25 of file ../../zircon/kernel/lib/libc/include/string-file.h

void StringFile (ktl::span<char> s)

Defined at line 25 of file ../../zircon/kernel/lib/libc/include/string-file.h

void StringFile (ktl::span<char> s)

Defined at line 25 of file ../../zircon/kernel/lib/libc/include/string-file.h

void ~StringFile ()

Defined at line 27 of file ../../zircon/kernel/lib/libc/include/string-file.h

ktl::span<char> used_region ()

Returns a region representing the currently used portion of the buffer.

Defined at line 39 of file ../../zircon/kernel/lib/libc/include/string-file.h

ktl::span<char> available_region ()

Returns a region representing the remaining unused space in the buffer,

_not_ including the space reserved for the final null character.

Defined at line 45 of file ../../zircon/kernel/lib/libc/include/string-file.h

void Skip (size_t amt)

Skip up to |amt| bytes in the buffer, advancing the write pointer as if we

had written data, but without actually changing the buffer.

Defined at line 53 of file ../../zircon/kernel/lib/libc/include/string-file.h

void Skip (size_t amt)

Skip up to |amt| bytes in the buffer, advancing the write pointer as if we

had written data, but without actually changing the buffer.

Defined at line 53 of file ../../zircon/kernel/lib/libc/include/string-file.h

void Skip (size_t amt)

Skip up to |amt| bytes in the buffer, advancing the write pointer as if we

had written data, but without actually changing the buffer.

Defined at line 53 of file ../../zircon/kernel/lib/libc/include/string-file.h

ktl::string_view as_string_view ()

Provide two ways for users to convert the currently used buffer into a

string_view. Given a string file |S|, users may say either:

1) S.as_string_view(); // or

2) static_cast

<ktl

::string_view>(S);

to perform the conversion.

Defined at line 66 of file ../../zircon/kernel/lib/libc/include/string-file.h

ktl::string_view operator basic_string_view ()

Defined at line 70 of file ../../zircon/kernel/lib/libc/include/string-file.h