StrPCopy - C++ Builder

C++ Builder 参考手册 ➙ System::Sysutils ➙ StrPCopy


复制字符串

头文件:#include
命名空间: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());

相关:

  • System::Sysutils::StrAlloc
  • System::Sysutils::StrBufSize
  • System::Sysutils::StrCat
  • System::Sysutils::StrComp
  • System::Sysutils::StrCopy
  • System::Sysutils::StrDispose
  • System::Sysutils::StrECopy
  • System::Sysutils::StrEnd
  • System::Sysutils::StrIComp
  • System::Sysutils::StrLCat
  • System::Sysutils::StrLComp
  • System::Sysutils::StrLCopy
  • System::Sysutils::StrLen
  • System::Sysutils::StrMove
  • System::Sysutils::StrNew
  • System::Sysutils::StrPCopy
  • System::Sysutils::StrPLCopy
  • System::Sysutils
  • std::strcpy, std::_fstrcpy, std::_tcscpy, std::wcscpy

C++ Builder 参考手册 ➙ System::Sysutils ➙ StrPCopy

你可能感兴趣的:(StrPCopy - C++ Builder)