⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stringop.h

📁 用来文本分类的
💻 H
字号:
#ifndef aaaSTRING_OPERATIONSaaa#define aaaSTRING_OPERATIONSaaa#include <string.h>#include <ctype.h>class StringOP {  public:       /* convert str into upper case text */        static char *ToUpper(char *str)       {           for (unsigned int i=0; i<strlen(str); i++)           {      	      if ( (unsigned char)str[i]>=0x80 )	      { i++; continue; }	      str[i]=toupper(str[i]);	   }	   return str;       }       /* convert str into lower case text */	static char *ToLower(char *str)	{	   for (unsigned int i=0; i<strlen(str); i++)	   {	     if ( (unsigned char)str[i]>=0x80 )	     { i++; continue; }	     str[i]=tolower(str[i]);	   }	   return str;	}        /* non-destructive strtok version, str: orginal text,	 ** delim: deliminator, tokens: string to hold the current tokens   	 *  return the advanced source pointer */	static char *Strtok(char *str,char *delim,char *tokens) 	{	    while (*str) {               if (strchr(delim,*str)) { str++; break; }	       *(tokens++)=(*(str++));	    }	    *tokens='\0';	    return str;	}};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -