SW006013 Microchip Technology, SW006013 Datasheet - Page 137

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
© 2008 Microchip Technology Inc.
strrchr (Continued)
strspn
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
if (ptr != NULL)
}
Output:
buf1 : What time is it?
m found at position 8
y not found
Calculate the number of consecutive characters at the beginning of a
string that are contained in a set of characters.
<string.h>
size_t strspn(const char *s1, const char *s2);
s1
s2
Returns the number of consecutive characters from the beginning of s1
that are contained in s2.
This function stops searching when a character from s1 is not in s2.
#include <string.h> /* for strspn */
#include <stdio.h>
int main(void)
{
}
printf("\n");
ptr = strrchr(buf1, ch2);
{
}
else
char str1[20] = "animal";
char str2[20] = "aeiounm";
char str3[20] = "aimnl";
char str4[20] = "xyz";
int res;
res = strspn(str1, str2);
printf("strspn(\"%s\", \"%s\") = %d\n",
res = strspn(str1, str3);
printf("strspn(\"%s\", \"%s\") = %d\n",
res = strspn(str1, str4);
printf("strspn(\"%s\", \"%s\") = %d\n",
res = ptr - buf1 + 1;
printf("%c found at position %d\n", ch2, res);
printf("%c not found\n", ch2);
str1, str2, res);
str1, str3, res);
str1, str4, res);
pointer to the string to be searched
pointer to characters to search for
/* for printf */
DS51456E-page 133

Related parts for SW006013