今天幫別人解決一個關于 Base64 編解碼的問題,竟然發現 Delphi 自帶了 Base64 編解碼的單元,叫
EncdDecd,這名字很拗口而且不直觀,估計這是一直很少人關注和知道的原因。
這個單元提供兩套四個公開函數:
對流的編解碼:
procedure EncodeStream(Input, Output: TStream); // 編碼
procedure DecodeStream(Input, Output: TStream); // 解碼
// 對字符串的編解碼:
function EncodeString(const Input: string): string; // 編碼
function DecodeString(const Input: string): string; // 解碼
這幾個函數在幫助中沒有。應該不算是標準庫中的函數。
新浪微博:http://t.sina.com.cn/androidguy 昵稱:李寧_Lining