📄 matchext.c
字号:
/***************************************************************************/
/* */
/* MATCHEXT.C */
/* */
/* Copyright (c) 1991 - Microsoft Corp. */
/* All rights reserved. */
/* Microsoft Confidential */
/* */
/* Checks a file name to see if it's extension exists in a list of */
/* different extensions. Returns the index to the first matching extension */
/* NOTE: the filename may consist of the full path to the file. */
/* */
/* int FindExtMatch( char *szFile, char **szExt ) */
/* */
/* ARGUMENTS: szFile - Ptr to filename to chech for a matching extension */
/* RETURNS: int - Index to matching extension in the list or -1 */
/* */
/* johnhe - 10/30/89 */
/***************************************************************************/
#include <stdio.h>
#include <string.h>
#include <strlib.h>
int FindExtMatch( char *szFile, char **szExt )
{
register iMatch;
iMatch = -1;
szFile = ParseFileName( szFile );
if ( (szFile = strchr( szFile, '.' )) != NULL )
iMatch = StrSearch( szFile + 1, szExt );
return( iMatch );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -