Last modified on 13 November 2012, at 10:44

REBOL Programming/undirize

USAGE:Edit

UNDIRIZE path 

DESCRIPTION:Edit

Returns a copy of the path with any trailing "/" removed.

UNDIRIZE is a function value.

ARGUMENTSEdit

  • path -- (Type: file string url)

SOURCE CODEEdit

undirize: func [
    {Returns a copy of the path with any trailing "/" removed.} 
    path [file! string! url!]
][
    path: copy path 
    if #"/" = pick path length? path [clear back tail path] 
    path
]