Java – combines two strings into a single string representing a path

See English answers > how to combine paths in Java? 9

How can I do this?

Solution

Apache commons IO do what you want from Apache commons io

Example:

FilenameUtils.normalize("foo/" + "/bar");

Return string "foo / bar"

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>