YASTR 1.0 review
DownloadYASTR is a simple string library that mainly consists of functionality that I require in my programs. This entire library should b
|
|
YASTR is a simple string library that mainly consists of functionality that I require in my programs.
This entire library should be compatible with ANSI C89 && C99. To use, copy 'yastr.c', include "yastr.h" and go. No libraries to link, no special compilation flags, nada, zip zilch.
No initialization of the library is needed, but it is possible to configure the library to use custom functions to manage memory, as well as set the character used to escape and unescape strings.
Much of the library uses a yastr string, which is (currently) a rather simple structure, but please use yastr_len() and yastr_strptr() to extract the length and string pointer from a yastr struct. In future releases, the members of the structure may change as needed, but there are currently no plans to change yastr_len() or yastr_strptr().
To create a new yastr struct, try yastrnew() or yastrdup(). To destroy a string and free up memory, use yastrfree() on the string.
Most of the naming convention is ya[function], where [function] is the C function most similar to ya[function]. For example: yavsnprintf() -> vsnprintf()
Yastr also impliments a few non-traditional functions for manipulating string structures.
YASTR 1.0 keywords