跳轉到內容

Rebol 程式設計/undirize

來自華夏公益教科書
UNDIRIZE path 

返回路徑的副本,刪除任何尾部的 "/"。

UNDIRIZE 是一個函式值。

  • path -- (型別:檔案字串 URL)

原始碼

[編輯 | 編輯原始碼]
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
]
華夏公益教科書