Friday, July 13, 2012

C String Library for C++ and Objective-C

In the last couple of years I've shifted professionally to iOS development.  In doing so, I adapted some of my previous code for use with Objective-C.

I converted my super minimal C++ string library, consisting of basic string manipulation and parsing functions, back into pure C so that I could use it more conveniently with Objective-C as well as C++.

You can find strs_c.c, strs_c.h at GitHub.

It is intended to be very basic and small, so there's no regex or anything like that.  There are string splitting and list handling functions, searching functions, trimming, parsing, etc.  I have further libraries building on top of this for more sophisticated tasks.  For example, an Objective-C JSON parsing library that I'll post right after this.

No comments: