Home Download Change log

Introduction

String handling in standard C is an errorprone thing. To avoid this I implemented this little C string wrapper on top of the standard C string functions for a safe usage of strings. It is written in standard C. Instead of the cryptic naming of the standard C string functions proper names are used (see cstrings.h).

Features

Compile

Sorry, there is no makefile, but compilation is simple:
    
gcc -I. -c common/cstrings.c -D_GNU_SOURCE -DHAVE_LONG_LONG
gcc -I. -c common/lists.c -D_GNU_SOURCE
gcc -I. -c common/global.c -D_GNU_SOURCE
gcc -I. -c errors.c -D_GNU_SOURCE
gcc -I. -c cstrings_demo.c -D_GNU_SOURCE
gcc -o cstrings_demo cstrings_demo.o cstrings.o lists.o global.o errors.o
Please note:

License

String library is currently under GPL version 2.

Download

cstrings-4.tar.bz2

ChangeLog

2024-02-18 4
  * fixed stringReplace(): string bounds
  * fixed stringCompare(): handle NULL as an empty string

2024-01-20 3
  * renamed stringIsValidUTF8Codepointn -> stringIsValidUTF8CodepointN
  * renamed stringNextUTF8n -> stringNextUTF8N
  * renamed stringAtUTF8n -> stringAtUTF8N
  * fixed stringFill
  * fixed UTF8 iterator
  * fixed stringAppend

2023-11-05 2
  * replaced ulong -> size_t

2023-06-18 1
  * initial public release
      

    
Back to top