構文
base64_encode(data: string): stringエイリアス
base64encodebase64.encodecrypt.base64.encodecrypt.base64_encodecrypt.base64encode引数
| 名前 | 型 | 説明 |
|---|---|---|
data | string | Base64 でエンコードされる文字列。 |
戻り値
| 名前 | 型 | 説明 |
|---|---|---|
encoded | string | Base64 でエンコードされた文字列。 |
説明
文字列を Base64 にエンコードします。
1 個のパラメータで呼び出します: data。引数表では必須値と動作を調整する値を確認できます。
encoded (string) を返します。戻り値表を使って成功値、nil 結果、回復可能なエラーを分けて扱ってください。
例
テキストをエンコードし、デコードして元の値に戻します。
local encoded = base64_encode("hello world")
local decoded = base64_decode(encoded)
print(encoded)
print(decoded)