Delphi 自带的 Base64 编解码函数
今天帮别人解决一个关于 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; // 解码
这几个函数在帮助中没有。应该不算是标准库中的函数。
这个单元提供两套四个公开函数:
对流的编解码:
procedure EncodeStream(Input, Output: TStream); // 编码
procedure DecodeStream(Input, Output: TStream); // 解码
// 对字符串的编解码:
function EncodeString(const Input: string): string; // 编码
function DecodeString(const Input: string): string; // 解码
这几个函数在帮助中没有。应该不算是标准库中的函数。
本文介绍Delphi自带的Base64编解码单元EncdDecd,提供了流和字符串两种编解码方式。该单元包含四个实用函数,帮助开发者轻松实现Base64的编码与解码。
1360

被折叠的 条评论
为什么被折叠?



