Kohi Game Engine
kstring Struct Reference

A kstring is a managed string for higher-level logic to use. It is safer and, in some cases quicker than a typical cstring because it maintains length/allocation information and doesn't have to use strlen on most of its internal operations. More...

#include <kstring.h>

Data Fields

u32 length
 The current length of the string in bytes. More...
 
u32 allocated
 The amount of currently allocated memory. Always accounts for a null terminator. More...
 
char * data
 The raw string data. More...
 

Detailed Description

A kstring is a managed string for higher-level logic to use. It is safer and, in some cases quicker than a typical cstring because it maintains length/allocation information and doesn't have to use strlen on most of its internal operations.

Field Documentation

◆ allocated

u32 allocated

The amount of currently allocated memory. Always accounts for a null terminator.

◆ data

char* data

The raw string data.

◆ length

u32 length

The current length of the string in bytes.


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