api_generator: create ruby string with size given in string, fixing returning strings with zeroes inside