camelize function written in C for performance comparison