csz

Crates.iocsz
lib.rscsz
version0.3.1
created_at2024-12-19 12:11:09.519442+00
updated_at2025-09-12 07:24:51.76681+00
descriptionAbstractions for nul-terminated C strings
homepage
repositoryhttps://github.com/numas13/csz
max_upload_size
id1489101
size73,772
Denis Drakhnia (numas13)

documentation

https://docs.rs/csz

README

Safer wrappers for nul-terminated C strings.

This crate uses C functions from the C standard library:

  • memchr
  • strlen
  • strstr
  • strcmp
  • strcasecmp (stricmp on windows)
  • malloc
  • free
  • realloc

Features

  • link_libc (enabled by default) - links to the C standard library. Disable the feature if you want to manually implement C functions.
  • libc - use libc crate.
  • alloc - enables linking to the alloc crate.

Usage

Add the following to your Cargo.toml:

[dependencies]
csz = "0.1"

Rust version support

The minimum supported Rust toolchain version is currently Rust 1.64.

Commit count: 39

cargo fmt