SW500009 Microchip Technology, SW500009 Datasheet - Page 277

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
Library Functions
STRTOK
Synopsis
Description
A number of calls to strtok() breaks the string s1 (which consists of a sequence of zero or more text
tokens separated by one or more characters from the separator string s2) into its separate tokens.
token, or NULL if no tokens were found. The inter-token separator character is overwritten by a null
character, which terminates the current token.
from the end of the last token found, and again return a pointer to the first character of the next token,
or NULL if no further tokens were found.
Example
The first call must have the string s1. This call returns a pointer to the first character of the first
For subsequent calls to strtok(), s1 should be set to a null pointer. These calls start searching
#include <string.h>
/* For baseline and midrange processors */
char * strtok (char * s1, const char * s2)
/* For high-end processors */
far char * strtok (far char * s1, const char * s2)
#include <stdio.h>
#include <string.h>
void
main (void)
{
char * ptr;
char * buf = "This is a string of words.";
char * sep_tok = ".,?! ";
ptr = strtok(buf, sep_tok);
while(ptr != NULL) {
printf("%s\n", ptr);
263

Related parts for SW500009