PathUndecorate function
Removes the decoration from a path string.
Syntax
void PathUndecorate(
_Inout_ LPTSTR pszPath
);
Parameters
- pszPath [in, out]
-
Type: LPTSTR
A null-terminated string of length MAX_PATH that contains the path. When the function returns, pszPath points to the undecorated string.
Return value
This function does not return a value.
Remarks
A decoration consists of a pair of square brackets with one or more digits in between, inserted immediately after the base name and before the file name extension.
Examples
The following table illustrates how strings are modified by PathUndecorate.
| Initial String | Undecorated String |
|---|---|
| C:\Path\File[5].txt | C:\Path\File.txt |
| C:\Path\File[12] | C:\Path\File |
| C:\Path\File.txt | C:\Path\File.txt |
| C:\Path\[3].txt | C:\Path\[3].txt |
Requirements
|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
PathUndecorateW (Unicode) and PathUndecorateA (ANSI) |