跳轉到內容

Rebol 程式設計/detab

來自華夏公益教科書,開放書籍,開放世界
DETAB string /size number 

將字串中的製表符轉換為空格。(製表符大小為 4)

DETAB 是一個原生值。

  • string -- (型別:任何字串)
  • /size -- 指定每個製表符的空格數。
    • number -- (型別:整數)

原始碼

[編輯 | 編輯原始碼]
detab: native[
    "Converts tabs in a string to spaces. (tab size 4)" 
    string [any-string!] 
    /size "Specifies the number of spaces per tab." 
    number [integer!]
]

華夏公益教科書