?? tst_strspn.c
字號(hào):
#include <string.h>
#include <stdio.h> /* for printf */
void tst_strspn ( char *digit_str) {
char octd [] = "01234567";
int i;
i = strspn (digit_str, octd);
if (digit_str [i] != '\0')
printf ("%c is not an octal digit\n", digit_str [i]);
}
void tst_strcspn (void) {
char buf [] = "13254.7980";
int i;
i = strcspn (buf, ".,");
if (buf [i] != '\0')
printf ("%c was found in %s\n", (char) buf [i], buf);
}
void tst_strpbrk (void) {
char vowels [] ="AEIOUaeiou";
char text [] = "Seven years ago...";
char * p;
p = strpbrk (text, vowels);
if (p == NULL)
printf ("No vowels found in %s\n", text);
else
printf ("Found a vowel at %s\n", p);
}
void tst_strrpbrk (void) {
char vowels [] ="AEIOUaeiou";
char text [] = "American National Standards Institute";
char * p;
p = strpbrk (text, vowels);
if (p == NULL)
printf ("No vowels found in %s\n", text);
else
printf ("Last vowel is at %s\n", p);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -