C++--字符串
来源:互联网 发布:sql 每小时 编辑:程序博客网 时间:2024/05/01 04:12
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<memory.h>
void myfan(char*str);
void inttostring(char* str1,int p)
{
int i=0;
int num=0;
do{
num=p%10;
str1[i]=num+'0';
p=p/10;
i++;
}while(p!=0);
myfan(str1);
};
void myfan(char*str){
int n=strlen(str);
int i=0;
for(;i<n/2;i++){
char temp;
temp=str[i];
str[i]=str[n-i-1];
str[n-i-1]=temp;
}
};
void main(){
char str[50];
char* strv="mu";
char str1[20]="fbuguk jdj";
char str2[20]="123";
char*p;
gets(str);
printf("%s\n",str);
/*int num;
num=memicmp(str,strv,4);
if(num==0){
printf("有");
}
else{
printf("枚有");
}*/
//memcpy(str2,str1,strlen(str1));
//_memccpy(str2,str1,'g',strlen(str1));
//int m=5439;
//char go[30]={0};
//inttostring(go,m);
//int d=atoi(str2);
//_strset(str2+1,'f');
//myfan(str2);
//printf("%s\n",str2);
//strncat(str,str1,3);
//printf("%s\n",str);
//char*p=strchr(str+2,'b');
//p=(char*)memchr(str,'x',90);
/*p=strstr(str,strv);
if(p==NULL){
printf("没有找到");
}
else{
printf("%c\n",*p);
}*/
system("pause");
}
0 0
- C字符串
- C++--字符串
- C字符串
- [C#] 字符串
- c字符串
- C++--字符串
- C-字符串
- C-字符串
- C:字符串
- C字符串
- C 字符串
- C--字符串
- C 字符串
- C字符串
- 【c++】字符串
- C字符串
- 【C++】字符串
- C字符串
- 用Java编写一个简单的编译器
- 代码篇C#网络编程之UDP进程通信
- Linux进程理解与实践(四)wait函数处理僵尸进程
- plist属性列表 文件的读写
- 如何在dop中Key值
- C++--字符串
- 常用的Reader类
- ubuntu: apt-get update的时候遇到“Hash Sum mismatch”错误
- 分享一个Linux下安装ASM+ORACLE的自动化脚本(一)
- C语言 ---relloc--calloc
- Java NIO 系列教程
- HightChart设置标题(Title)
- MVC模式(框架)
- 排序算法总结(上)