📄 touplow.c
字号:
/* CXL - Copyright (c) 1987-1989 by Mike Smedley - All Rights Reserved */
/* TOUPLOW.C - converts a character to upper or lower case depending
on the previous character in the string */
#include <ctype.h>
#include <string.h>
#include "cxlstr.h"
int touplow(char *str,char *pos,int ch)
{
register int i;
switch(*(pos-1)) { /* check previous character */
case ' ': /* see if it is a separator */
case '-':
case '_':
case ',':
case '.':
case '/':
i=toupper(ch); /* if it is, convert to upper */
break;
default:
if(pos==str) /* see if at beginning of string */
i=toupper(ch); /* if so, convert to upper */
else
i=tolower(ch); /* otherwise, convert to lower */
}
return(i); /* return converted character */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -