求助:此段代码如何改成函数调用?
char *gbk = menu[i];uint32_t gbk_len = strlen(gbk);
uint32_t utf8buffer_len = gbk_len * 3 + 1;
char *utf8buffer = (char *)malloc(utf8buffer_len);
memset(utf8buffer, 0, utf8buffer_len);
gbk_to_utf8(gbk, gbk_len, &utf8buffer, &utf8buffer_len);
strcpy(menu[i], utf8buffer);
free(utf8buffer);
以上代码要改成函数调用。其中menu[i]是字符串作为参数调入,最后函数调用后返回的值为字符串menu[i],应如何改,函数应如何写,调用语句应如何写!!!