Last modified on 13 November 2012, at 10:48

REBOL Programming/suffix?

USAGE:Edit

SUFFIX? path 

DESCRIPTION:Edit

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

SUFFIX? is a function value.

ARGUMENTSEdit

  • path -- (Type: any-string)

SOURCE CODEEdit

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]
]