atom

Description

Simple string interning library. Interning strings will optimize memory usage and prevent duplicates, allowing for faster comparison and reduced memory overhead. This is useful when you need to store many identical strings (such as identifiers or constants) but want to avoid storing them multiple times.

Table of Contents

Features

atom_string(const char *str): Interns a string and returns a pointer to the interned string. It is automatically converted to a string if given an argument of type const char *.
atom_int(int64_t n): Converts an integer to its string representation and interns it. Useful for handling numeric strings efficiently.

Usage

Credits / Resources

Tom Preston-Werner README Driven Development
Make a README
Choose a LICENSE
C Interfaces and Implementations
Glib - Quark

License

This project is licensed under MIT - see the LICENSE file for details.

Description
Simple string interning library.
Readme MIT 42 KiB
Languages
C 90.2%
Makefile 9.8%