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

📄 filename.h

📁 This software performs code conversion of Chinese characters, including GB2312/GBK and BIG5. It a
💻 H
字号:
// filename.h

#ifndef FILENAME_H
#define FILENAME_H

#ifdef __cplusplus
extern "C" {
#endif


char *GetExtensionA ( const char *szPathName ) ;
wchar_t *GetExtensionW ( const wchar_t *szPathName ) ;
char *ChangeExtensionA ( char *szPathName, const char *szExtension ) ;
wchar_t *ChangeExtensionW ( wchar_t *szPathName, const wchar_t *szExtension ) ;

char *GetFileNameA ( const char *szPathName ) ;
wchar_t *GetFileNameW ( const wchar_t *szPathName ) ;
char *ChangeFileNameA ( char *szPathName, const char *szFileName ) ;
wchar_t *ChangeFileNameW ( wchar_t *szPathName, const wchar_t *szFileName ) ;

size_t GetFullPathNameExA ( const char *szSrcFileName, char *szDstFileName, size_t nMaxLen ) ;
size_t GetFullPathNameExW ( const wchar_t *szSrcFileName, wchar_t *szDstFileName, size_t nMaxLen ) ;
char *GetFullPathNameAllocA ( const char *szFileName ) ;
wchar_t *GetFullPathNameAllocW ( const wchar_t *szFileName ) ;

int IsFullPathNameA ( const char *szPathName ) ;
int IsFullPathNameW ( const wchar_t *szPathName ) ;
int IsFileNameUrlW ( const wchar_t *szPathName ) ;
int IsFileNameUrlA ( const char *szPathName ) ;
int IsFileNameUncW ( const wchar_t *szPathName ) ;
int IsFileNameUncA ( const char *szPathName ) ;

char *SetPathSeparatorA ( char *szPathName, int IsAddSeparator ) ;
wchar_t *SetPathSeparatorW ( wchar_t *szPathName, int IsAddSeparator ) ;

char *QuoteFileNameA ( char *szPathName ) ;
wchar_t *QuoteFileNameW ( wchar_t *szPathName ) ;
char *UnquoteFileNameA ( char *szPathName ) ;
wchar_t *UnquoteFileNameW ( wchar_t *szPathName ) ;


#ifdef __cplusplus
}
#endif


#ifdef UNICODE
#define GetExtension GetExtensionW
#define ChangeExtension ChangeExtensionW
#define GetFileName GetFileNameW
#define ChangeFileName ChangeFileNameW
#define GetFullPathNameEx GetFullPathNameExW
#define GetFullPathNameAlloc GetFullPathNameAllocW
#define IsFullPathName IsFullPathNameW
#define IsFileNameUnc IsFileNameUncW
#define IsFileNameUrl IsFileNameUrlW
#define SetPathSeparator SetPathSeparatorW
#define QuoteFileName QuoteFileNameW
#define UnquoteFileName UnquoteFileNameW
#define CanonicalizePathName CanonicalizePathNameW
#else
#define GetExtension GetExtensionA
#define ChangeExtension ChangeExtensionA
#define GetFileName GetFileNameA
#define ChangeFileName ChangeFileNameA
#define GetFullPathNameEx GetFullPathNameExA
#define GetFullPathNameAlloc GetFullPathNameAllocA
#define IsFullPathName IsFullPathNameA
#define IsFileNameUnc IsFileNameUncA
#define IsFileNameUrl IsFileNameUrlA
#define SetPathSeparator SetPathSeparatorA
#define QuoteFileName QuoteFileNameA
#define UnquoteFileName UnquoteFileNameA
#define CanonicalizePathName CanonicalizePathNameA
#endif


// for IsAddSeparator
#define ADD_SEPARATOR_ALWAYS        1
#define ADD_SEPARATOR_ONLY_ROOT     2
#define REMOVE_SEPARATOR_ALWAYS     0



#if defined DEBUG_CONST_STRING && defined __cplusplus    // for debug

#define FUNC_STR(func,type)   \
   static inline const type *func##_ ( const type *s ) { return func ( s ) ; } \
   static inline       type *func##_ (       type *s ) { return func ( s ) ; }

FUNC_STR ( GetExtensionA, char )
FUNC_STR ( GetExtensionW, wchar_t )
FUNC_STR ( GetFileNameA, char )
FUNC_STR ( GetFileNameW, wchar_t )

#undef FUNC_STR

#define GetExtensionA GetExtensionA_
#define GetExtensionW GetExtensionW_
#define GetFileNameA GetFileNameA_
#define GetFileNameW GetFileNameW_

#endif // defined DEBUG_CONST_STRING && defined __cplusplus


#endif


⌨️ 快捷键说明

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