strspn
来源:互联网 发布:海曙小学生编程 编辑:程序博客网 时间:2024/05/18 01:18
原型
size_t strspn(const char *s, const char * reject);功能
若strcspn()返回的数值为n, 则代表字符串s 连续有n 个字符都包含reject 内的字符.示例
#include <string.h>#include <iostream.h>void main(){ char *s="Golden Global View"; cout<<strspn(s, " ")<<endl; cout<<strspn(s, "loG")<<endl; cout<<strspn(s, "nedloG")<<endl; cout<<strspn(s, "nGew")<<endl;}
结果:
0 //开始不包含空格
3 //有Gol
6 //有nedloG
1 //有G
0 0
- strspn
- strspn
- strspn
- strspn
- strspn
- strspn() ,strspn函数
- strspn function
- strspn.c
- strspn() 函数
- strspn函数
- strspn函数
- strspn & strcspn
- strspn用法
- strspn()函数
- strspn源码
- strspn和strcspn妙用
- strspn和strcspn妙用
- strspn strcspn 函数
- list、set、map集合的综合应用
- CSS 设置宽度适合屏幕
- STL源码剖析——deque
- Memcached - In Action
- 两个线程同时做100次a++
- strspn
- 避免死锁
- JMS学习(2):ActiveMQ简单介绍以及安装
- Embedding Greek and scripts into text IDL
- poj 3670 Eating Together LIS
- 跳转页面并返回
- 罗马数字与罗马字母
- 第十六周项目1.2—小玩文件
- solr 个性化打分