libclod
C library for interacting with NBTs, region files, LOD data and other things.
Loading...
Searching...
No Matches
clod_string Struct Reference

#include <string.h>

Public Attributes

char * ptr
ptrdiff_t len
ptrdiff_t cap

Detailed Description

Describes an array of bytes in memory. Often a human-readable string, but may encapsulate other objects.

A null string must always be represented by a null ptr, and a read-only memory region must always be represented with a zero cap.

Definition at line 25 of file string.h.

Member Data Documentation

◆ ptr

char* clod_string::ptr

Pointer. The underlying memory may be read-only.

Definition at line 28 of file string.h.

◆ len

ptrdiff_t clod_string::len

Size of the active section in ptr. If cap is nonzero, len may never be larger than cap.

Definition at line 32 of file string.h.

◆ cap

ptrdiff_t clod_string::cap

Total capacity of the memory in ptr. A value of zero indicates the underlying memory is read-only and must not be modified.

Definition at line 36 of file string.h.


The documentation for this struct was generated from the following file: