字符串处理
Dark_Passion
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
指针-字符串处理-匹配字符串
转自:http://blog.csdn.net/v_july_v/article/details/6347454 #include #include using namespace std; bool Is_Match(const char *strOne,转载 2011-09-25 13:35:54 · 796 阅读 · 1 评论 -
判断n是否为2的幂
//判断n是否为2的幂#includeint foo( int i );int foo_(int i);int foo_1(int );int main(){ int bool1=foo(1); bool1=foo_(1024); bool1原创 2011-10-11 14:32:02 · 1187 阅读 · 0 评论 -
KMP--字符匹配
/******* kmp_1.cpp ******/ #include#include#include"kmp_2.h"void get_next(char *T,int *next) //这个函数是重点{ int i=0, j=-1;//j在前,i在原创 2011-10-07 14:20:41 · 548 阅读 · 0 评论 -
网易笔试题 -字符处理
#include #include /* 把字符串整体reverse */void _reverse(char *begin, char *end){ while(end > begin){ char tmp = *end;转载 2011-10-03 13:48:40 · 544 阅读 · 1 评论 -
c--atoi
#includeusing namespace std;int atioi_(char *s){int sign=1,num=0; if(*s=='-') sign=-1; s++; while((*s)!='\0') {原创 2011-10-01 13:09:20 · 494 阅读 · 1 评论 -
strstr--字符串处理
#include#includechar * strstr_1(char *s1,char *s2);char *strstr_2(char *s1,char *s2);char *strstr_3(char *s1, char *s2);int main(){原创 2011-10-11 11:38:14 · 659 阅读 · 0 评论 -
renren面试题--字符处理
int fun(char [ ] );char a[ ]="123";fun(a);得到123#include #include #include using namespace std;int str_2_int(string str){ i原创 2011-09-25 14:05:40 · 553 阅读 · 0 评论 -
指针-字符处理-字符旋转
#include #include void rotate(char *start, char *end){ while(start != NULL && end !=NULL && start<end) { char temp=*star原创 2011-09-25 12:41:25 · 439 阅读 · 1 评论 -
bitmap--字符处理
# include # include const int N = 26; int bit_map[N]; void findNoRepeat(char *src) { int pos; char *str = src;转载 2011-09-25 23:28:46 · 730 阅读 · 0 评论 -
strtok--字符串处理
#include#includeusing namespace std;int main (){ char sentence []= "this is a sentence with 7 tokens"; cout <<"this string to be tokenized is "<<endl<<sentence<<endl; char *tokenp=strt原创 2011-10-23 16:39:11 · 753 阅读 · 1 评论
分享