编辑代码

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main () {
    //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
    char szName[100] = "vsys1Profile-profile1";
    printf("%d\r\n", strncmp((char *)szName, "vsys", strlen("vsys")));
    int num = 0;
    sscanf((char *)szName, "vsys%u", &num);
    printf("%d\r\n", num);
    return 0;
}