Made len and i in nsStringToCString NSInts not ints