回覆列表
  • 1 # 藍風24

    #include

    static char *olds;

    #undef strtok

    char *strtok (s, delim)

    char *s;

    const char *delim;

    {

    char *token;

    if (s == NULL)

    s = olds;

    /* Scan leading delimiters. */

    s += strspn (s, delim); //將指標移到第一個非delim中的字元的位置

    if (*s == "\0")

    {

    olds = s;

    return NULL;

    }

    olds = __rawmemchr (token, "\0");

    else

    {

    /* Terminate the token and make OLDS point past it. */

    *s = "\0";

    olds = s + 1;

    }

    return token;

    }

  • 中秋節和大豐收的關聯?
  • win10上怎麼安裝visualc++?