📄 strchg.c
字号:
/* CXL - Copyright (c) 1987-1989 by Mike Smedley - All Rights Reserved */
/* STRCHG.C - changes all occurrences of one character to another */
#include "cxldef.h"
#include "cxlstr.h"
int strchg(char *str,int oldch,int newch)
{
register int count=0;
char *p;
for(p=str;*p;p++) {
if(oldch==*p) {
*p=(char)newch;
count++;
}
}
return(count);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -