C语言如何实现将字符串“A1234-E4566-SDFS”中‘-’分隔开的几个字串“A1234”“E4566”“SDFS”取出来? 有个函数叫strtok #include <stdio.h>#include <string.h>int main(void){ char buf[] = "A1234-E4566-SDFS"; char *tok; tok = strtok(buf, "-"); while (tok) { (void)printf("%s/n", tok); tok = strtok(0, "-"); } return 0;}