Remove file extension from a file name string

前端 未结 12 1680
一个人的身影
一个人的身影 2020-11-27 14:18

If I have a string saying \"abc.txt\", is there a quick way to get a substring that is just \"abc\"?

I can\'t do an fileName.IndexOf(

12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 14:56

    You maybe not asking the UWP api. But in UWP, file.DisplayName is the name without extensions. Hope useful for others.

提交回复
热议问题