Extra functions for working with C strings