C-Language string segmentation function (Strtok ())

Source: Internet
Author: User
Tags define function strtok

Header files: #include <string.h>

Define function: char * strtok (char *s, const char *delim);

Function Description: Strtok () is used to split a string into fragments. The parameter S points to the string to be split, the parameter Delim is the split string, and when Strtok () discovers the split character of the parameter Delim in the string of the parameter s, the character is changed to the \ = character. At the first call, Strtok () must give the parameter S string, and the subsequent call sets the parameter s to null. Each successful call returns the next segmented string pointer.

Return value: Returns the next segmented string pointer, or null if no partition has been made.

Additional:

C language function manual:

Http://c.biancheng.net/cpp/html/175.html

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

C-Language string segmentation function (Strtok ())

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.