Rebol 编程/suffix?
外观
< Rebol 编程
SUFFIX? path
返回文件名或 URL 的后缀(扩展名),否则返回 NONE。
SUFFIX? 是一个函数值。
- path -- (类型: any-string)
suffix?: func [
{Return the suffix (ext) of a filename or url, else NONE.}
path [any-string!]
][
if all [
path: find/last path #"."
not find path #"/"
] [to-file path]
]