is this function used outside the lib itself?
if so, i think a hint would be nice to tell "users" that you are returning a "strdupped" string, which has to be freed explicitly.
just a thought...