rrrrr
rrrrr

Reputation: 47

Manipulate LPCWSTR in c

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

Answers (1)

JJF
JJF

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

Related Questions