简体   繁体   中英

Get filename from full path in Pascal

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM