Add a length method to the cstring implementation