Every now and then I need to write some string processing code in C, because the Python (or awk/sed/etc, or even perl) alternatives just aren't running fast enough. However, life is too short to write raw string manipulation code in C. What I want to do is to write Python-in-C, using some library to handle all of the low-level string manipulation so that I just write high-level stuff.

The library I like for this is bstring (also here).

There are other C string manipulation libraries, but none that I turned up the last time I looked have interfaces as nice as bstring's. And bstring works, although it does have a few idiosyncrasies.

In the process of giving bstring a workout, I wrote a number of programs and some additional support routines. You can find the full package here. (Hopefully they have enough comments et al to be followable.)

Note: I see that the bstring base version that I developed against is a little bit out of date. I haven't had time yet to update my programs to make use of the latest additions, so there may be some functional duplication there.

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sat Jun 11 20:47:24 2005
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.