📄 tools.c
字号:
/*
* Copyright (C) 1999-2000 Computer & Communications Research Laboratories,
* Industrial Technology Research Institute
*/
/*
* tools.c
*/
#include <string.h>
#include <stdlib.h>
/* copy string s, mapping to uppercase */
char* copyUp(char* s)
{
char* copy;
char* c;
if( s==NULL ) return NULL;
copy = malloc(strlen(s)+1);
c = copy;
while( ((*c++)=toupper(*s++)) != 0 );
return copy;
}
/* return true if pattern appears in s */
/* ??? check and see if strstr is reasonably efficient
* probably will be replaced by simple data structure
*/
int contains(char*s, char*pattern)
{
return s!=NULL && strstr(s,pattern) != NULL;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -