今天帮别人解决一个关于 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; // 解码
这几个函数在帮助中没有。应该不算是标准库中的函数。
新浪微博手机客户端(Android/Ophone版) 发布
《银河系列原创教程》发布
《Java Web开发速学宝典》出版,欢迎定购
这个单元提供两套四个公开函数:
对流的编解码:
procedure EncodeStream(Input, Output: TStream); // 编码
procedure DecodeStream(Input, Output: TStream); // 解码
// 对字符串的编解码:
function EncodeString(const Input: string): string; // 编码
function DecodeString(const Input: string): string; // 解码
这几个函数在帮助中没有。应该不算是标准库中的函数。
新浪微博手机客户端(Android/Ophone版) 发布
《银河系列原创教程》发布
《Java Web开发速学宝典》出版,欢迎定购
本文介绍了一个鲜为人知的Delphi内置Base64编解码单元——EncdDecd。该单元提供了四组公开函数,分别用于流和字符串的Base64编码与解码。这些实用的函数并未包含在官方的帮助文档中。
2233

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



