美文网首页
StrPCopy - C++ Builder

StrPCopy - C++ Builder

作者: 玄坴 | 来源:发表于2022-04-11 09:30 被阅读0次

C++ Builder 参考手册System::SysutilsStrPCopy


复制字符串

头文件:#include <System.SysUtils.hpp>
命名空间:System::Sysutils
函数原型:

char *__fastcall StrPCopy(char *Dest, const System::AnsiString Source);
System::WideChar *__fastcall StrPCopy(System::WideChar *Dest, const System::UnicodeString Source);

参数:

  • Dest:把 Source 的内容复制到 Dest 里面;
  • Source:把 Source 的内容复制到 Dest 里面;

返回值:

  • 把 Source 的内容复制到 Dest 里面 (Dest 内容被替换),函数返回 Dest;
  • Dest 字符串要有 (字符串长度 + 1) 个字符储存要复制的内容 (多出来的那个字符储存结束符);
  • 这个函数只是用来兼容 Delphi 程序,C++ 可以直接使用 std::wcscpy(p, s.c_str()); 或 std::strcpy(p, s.c_str());

相关:


C++ Builder 参考手册System::SysutilsStrPCopy

相关文章

网友评论

      本文标题:StrPCopy - C++ Builder

      本文链接:https://www.haomeiwen.com/subject/oqidahtx.html