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

📄 strmatch.h

📁 求2个或多个文本间的公共子串
💻 H
字号:
#include <unistd.h>#include <sys/stat.h>#include <sys/types.h>#include <errno.h>#include <fcntl.h>#include <malloc.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include "publib.h"#ifndef NULL#define NULL (void *)0#endif#ifndef min#define min(x, y) ((x > y)? y:x)#endif#ifndef max#define max(x, y) ((x > y)? x:y)#endif#ifndef _STRMATCH_HEADER_#define _STRMATCH_HEADER_typedef struct StrNode{	smch_t * pSmch;         /* the begin address */	size_t uiBegPos;        /* the begin pos for the common string in the shortest string */	size_t uiSmchLen;       /* smch_t */}StrNode;typedef struct StrList{	StrNode * pNodeArray;	size_t memLen;	size_t memUse;}StrList;/*extract all same substringsinput:	strOne: the first string address	nOneLen: the first string's length	strTwo: the second string address	nTwoLen: the second string's length	nItv: the minimun element sizeoutput: 0 successful; or -1 indicates failure **********/int strmatch(smch_t * strLong, const size_t nLongLen, smch_t * strShort,const size_t offset, const size_t nShortLen, StrList * pStrList, const size_t listSize);#endif

⌨️ 快捷键说明

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