PCDIDE COMPILER Custom Computer Services Inc (CCS), PCDIDE COMPILER Datasheet - Page 309

PCD C-COMPILER PIC24, DSPIC

PCDIDE COMPILER

Manufacturer Part Number
PCDIDE COMPILER
Description
PCD C-COMPILER PIC24, DSPIC
Manufacturer
Custom Computer Services Inc (CCS)
Type
Compilerr
Datasheet

Specifications of PCDIDE COMPILER

For Use With/related Products
Microchip PIC24/dsPIC®
Lead Free Status / RoHS Status
Not applicable / Not applicable
Other names
429-1008
strtok( )
Syntax:
Parameters:
Returns:
Function:
Availability:
Requires:
Examples:
Example Files:
Also See:
ptr = strtok(s1, s2)
s1 and s2 are pointers to an array of characters (or the name of an array). Note
that s1 and s2 MAY NOT BE A CONSTANT (like "hi"). s1 may be 0 to indicate a
continue operation.
ptr points to a character in s1 or is 0
Finds next token in s1 delimited by a character from separator string s2 (which can
be different from call to call), and returns pointer to it.
First call starts at beginning of s1 searching for the first character NOT contained
in s2 and returns null if there is none are found.
If none are found, it is the start of first token (return value). Function then
searches from there for a character contained in s2.
If none are found, current token extends to the end of s1, and subsequent
searches for a token will return null.
If one is found, it is overwritten by '\0', which terminates current token. Function
saves pointer to following character from which next search will start.
Each subsequent call, with 0 as first argument, starts searching from the saved
pointer.
All devices.
#INCLUDE <string.h>
char string[30], term[3], *ptr;
strcpy(string,"one,two,three;");
strcpy(term,",;");
ptr = strtok(string, term);
while(ptr!=0) {
ex_str.c
strxxxx(),
puts(ptr);
ptr = strtok(0, term);
}
strcpy()
// Prints:
one
two
three
295

Related parts for PCDIDE COMPILER