char leftchar des int size char src int count模型; 返回结果字符串指针用例的所有例子
模型: char* left(char* des, int size, char* src, int count);
返回结果字符串指针。
用例:
-
输入:des = "abc", size = 10, src = "hello world", count = 5 预期输出:des = "hello", 返回值为指向des的指针
-
输入:des = "", size = 5, src = "hello world", count = 8 预期输出:des = "hello wo", 返回值为指向des的指针
-
输入:des = "12345", size = 6, src = "hello world", count = 0 预期输出:des = "12345", 返回值为指向des的指针
-
输入:des = "abc", size = 3, src = "hello world", count = 5 预期输出:des = "hel", 返回值为指向des的指针
-
输入:des = "abc", size = 4, src = "hello world", count = 20 预期输出:des = "hello world", 返回值为指向des的指针
-
输入:des = "", size = 0, src = "hello world", count = 5 预期输出:des = "", 返回值为指向des的指
原文地址: https://www.cveoy.top/t/topic/fix1 著作权归作者所有。请勿转载和采集!