< Rebol Programming

USAGE:

SUFFIX? path 

DESCRIPTION:

Return the suffix (ext) of a filename or url, else NONE.

SUFFIX? is a function value.

ARGUMENTS

  • path -- (Type: any-string)

SOURCE CODE

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]
]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.