Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C String Libraries

Name: Anonymous 2010-02-20 10:48

What are your experiences from using C string libraries (bstring and friends)? I'm starting a project that I'm going to write in ANSI C and that is quite heavy on string processing, and having support for actual strings (as opposed to null-terminated arrays) would be a real time saver. And no, I'm not going to use glib or any other `let's make C something else entirely' solution.

Name: Anonymous 2010-02-20 19:02

Just get used to pointers.
something like

char *cPtr;
for(cPtr = string;*cPtr != '\0';cPtr++)
    processchar(*cPtr);

and you're basically all set.
Point to end of string:
cPtr += strlen(cPtr);

strtok can be quite annoying.

Just play around with it a bit and you'll get used to it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List