Get filename from full path in Pascal

流过昼夜 提交于 2019-12-09 03:56:43

问题


I'm wondering how to get a file name from full path in Pascal.

In .NET, we have two functions - Path.GetFileName and String.IndexOf, both of them allow to accomplish the task.

For example, "C:\docs\file.txt" will return "file.txt".

What would be the Pascal equivalent?


回答1:


It is the ExtractFileName function. Thanks to Ken's comment.



来源:https://stackoverflow.com/questions/6102873/get-filename-from-full-path-in-pascal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!