Skip to content

Releases: UniquePython/strlib

v0.2.0 — SV Expansion

Pre-release

Choose a tag to compare

@UniquePython UniquePython released this 08 Apr 05:36

v0.2.0

Added

SVArray — a heap-allocated growable array of SVs, used as the return type of sv_split.

  • sva_new, sva_push, sva_get, sva_free

SV predicates — inspect the contents of a string view without allocating:

  • sv_is_empty, sv_is_whitespace, sv_is_alpha, sv_is_numeric, sv_is_alphanumeric, sv_is_upper, sv_is_lower

SV counting — count occurrences of a needle in a string view:

  • sv_count_sv with overlapping flag
  • sv_count and sv_count_overlapping macros

SV number parsing — parse a string view into a numeric type, returning false on failure:

  • sv_parse_int, sv_parse_long, sv_parse_longlong
  • sv_parse_int8, sv_parse_int16, sv_parse_int32, sv_parse_int64
  • sv_parse_uint8, sv_parse_uint16, sv_parse_uint32, sv_parse_uint64
  • sv_parse_float, sv_parse_double

SV splitting — split a string view on a delimiter into an SVArray:

  • sv_split_char, sv_split_sv
  • sv_split macro dispatching on delimiter type
  • Supports maxsplit — pass 0 for no limit
  • Empty segments preserved (Python behavior)

Full Changelog: v0.1.0...v0.2.0

strlib v0.1.0 — Initial Release

Pre-release

Choose a tag to compare

@UniquePython UniquePython released this 06 Apr 12:15

The first release of strlib, a small C11 string handling library built around a three-layer ownership model: string views (SV) for zero-cost borrowing, owned heap strings (Str) for safe persistence, and a string builder (SB) for efficient incremental construction.

Requires C11, GCC or Clang. No dependencies beyond libc.

See the README for the full API reference, design philosophy, and known footguns.