Skip to content

zb1ndev/cstring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

cstring

A lightweight, header-only C library for working with dynamic strings.
It provides a simple string struct with built-in memory management, append operations, and formatted string construction — without needing to manually handle malloc, realloc, and strlen everywhere.

Features

  • Header-only (just include it)
  • Simple string struct with data, length, and capacity
  • Safe creation from literals, sections, or formatted strings
  • Append support (with optional destroy to avoid leaks)
  • Automatic cleanup with string_drop
  • Colored log macros (LOGF, WARNF, ERRORF)

Installation

Simply copy cstring.h into your project and include it:

#include "cstring.h"

About

A Header-Only String Library for C

Topics

Resources

License

Stars

Watchers

Forks

Languages