StrPLCopy - C++ Builder

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


复制字符串

头文件:#include
命名空间:System::Sysutils
函数原型:

char *__fastcall StrPLCopy(char *Dest, const System::AnsiString Source, unsigned MaxLen);
System::WideChar *__fastcall StrPLCopy(System::WideChar *Dest, const System::UnicodeString Source, unsigned MaxLen);

参数:

  • Dest:把 Source 的内容复制到 Dest 里面;
  • Source:把 Source 的内容复制到 Dest 里面;
  • MaxLen:最多复制的字符个数 (不包括结束符);

返回值:

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

相关:

  • 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
  • std::strncpy, std::_fstrncpy, std::_tcsncpy, std::wcsncpy

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

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