splitpath_string 字符串替换_getmodulefilename

电脑杂谈  发布时间:2017-03-30 14:11:27  来源:网络整理

string 字符串替换_getmodulefilename_splitpath

splitpathsplitpath

Break a path name into components.

void _splitpath( const char *path, char *drive, char *dir, char *fname, char *ext );

void _wsplitpath( const wchar_t *path, wchar_t *drive, wchar_t *dir, wchar_t *fname, wchar_t *ext );

For additional compatibility information, see Compatibility in the Introduction.

Libraries

Return Value

None

Parameters

path

string 字符串替换_splitpath_getmodulefilename

Full path

drive

Optional drive letter, followed by a colon (:)

dir

Optional directory path, including trailing slash. Forward slashes ( / ), backslashes ( \ ), or both may be used.

fname

Base filename (no extension)

ext

Optional filename extension, including leading period (.)

Remarks

The _splitpath function breaks a path into its four components. _splitpath automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. _wsplitpath is a wide-character version of _splitpath; the arguments to _wsplitpath are wide-character strings. These functions behave identically otherwise.

Generic-Text Routine Mappings

Each argument is stored in a buffer; the manifest constants _MAX_DRIVE, _MAX_DIR, _MAX_FNAME, and _MAX_EXT (defined in STDLIB.H) specify the maximum size necessary for each buffer. The other arguments point to buffers used to store the path elements. After a call to _splitpath is executed, these arguments contain empty strings for components not found in path. You can pass a NULL pointer to _splitpath for any component you don’t need.


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-38471-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 安云初
      安云初

      预调酒大佬锐澳陷库存泥潭

    热点图片
    拼命载入中...