本文介绍了从Pascal中的完整路径获取文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何从Pascal中的完整路径获取文件名.
I'm wondering how to get a file name from full path in Pascal.
在.NET中,我们有两个函数-Path.GetFileName和String.IndexOf,它们两个都可以完成任务.
In .NET, we have two functions - Path.GetFileName and String.IndexOf, both of them allow to accomplish the task.
例如,"C:\ docs \ file.txt"将返回"file.txt".
For example, "C:\docs\file.txt" will return "file.txt".
Pascal换算成什么?
What would be the Pascal equivalent?
推荐答案
它是 ExtractFileName 函数.感谢Ken的评论.
It is the ExtractFileName function. Thanks to Ken's comment.
这篇关于从Pascal中的完整路径获取文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!