SW006013 Microchip Technology, SW006013 Datasheet - Page 140

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
DS51456E-page 136
strtok (Continued)
Example:
strxfrm
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
#include <string.h> /* for strtok, NULL */
#include <stdio.h> / * for printf
int main(void)
{
}
Output:
str1 : Here, on top of the world!
word 1: Here
word 2: on
word 3: top
word 4: of
word 5: the
word 6: world!
Transforms a string using the locale-dependent rules. (See Remarks.)
<string.h>
size_t strxfrm(char *s1, const char *s2, size_t n);
s1
s2
n
Returns the length of the transformed string not including the terminat-
ing null character. If n is zero, the string is not transformed (s1 may be
a point null in this case) and the length of s2 is returned.
If the return value is greater than or equal to n, the content of s1 is
indeterminate. Since the 16-bit compiler does not support alternate
locales, the transformation is equivalent to strcpy, except that the
length of the destination string is bounded by n-1.
char str1[30] = "Here, on top of the world!";
char delim[5] = ", .";
char *word;
int x;
printf("str1 : %s\n", str1);
x = 1;
word = strtok(str1,delim);
while (word != NULL)
{
}
printf("word %d: %s\n", x++, word);
word = strtok(NULL, delim);
destination string
source string to be transformed
number of characters to transform
© 2008 Microchip Technology Inc.
*/

Related parts for SW006013