Reputation: 47
I have a given LPCWSTR variable, which holds a full path.
I want to extract from it only the file name.
Any suggestions how can I manipulate the LPCWSTR to achieve that?
In addition - How can I get the char in a specific index of the LPCWSTR?
Thank you.
Upvotes: 0
Views: 308
Reputation: 2777
The windows function PathStripPath will do what you want. Since you have a Unicode string you'll want to call the "W" version PathStripPathW.
Upvotes: 2