跳轉到內容

Rebol 程式設計/enbase

來自華夏公益教科書,開放的書籍,開放的世界
ENBASE value /base base-value 

將字串轉換為不同的基數表示。

ENBASE 是一個原生值。

  • value -- 要編碼的字串(型別:any-string)
  • /base -- 允許選擇不同的基數進行轉換
    • base-value -- 要轉換到的基數:64、16 或 2(型別:any)

原始碼

[編輯 | 編輯原始碼]
enbase: native[
    {Converts a string to a different base representation.} 
    value [any-string!] "The string to encode" 
    /base {Allow a selection of a different base for conversion} 
    base-value "The base to convert to: 64, 16, or 2"
]
華夏公益教科書