About 271,000 results
Open links in new tab
  1. Different ways to copy a string in C/C++ - GeeksforGeeks

    Jul 23, 2025 · The easiest way to copy a string is to use the assignment operator (=) of the std::string class to copy the contents of one string to another. Note: There are no inbuilt classes in C, hence '=' …

  2. C strcpy () - C Standard Library - Programiz

    In this tutorial, you will learn to use the strcpy () function in C programming to copy strings (with the help of an example).

  3. String Copying in C: A Complete Guide to strcpy, strncpy, and strlcpy

    Jan 19, 2025 · Learn the crucial differences between C's string copying functions - strcpy, strncpy, and strlcpy. Master secure string manipulation in C programming.

  4. C string strcpy () Function - W3Schools

    The strcpy() function is defined in the <string.h> header file. Note: Make sure that the destination string has enough space for the data or it may start writing into memory that belongs to other variables.

  5. String.Copy (String) Method (System) | Microsoft Learn

    The Copy method returns a String object that has the same value as the original string but represents a different object reference. It differs from an assignment operation, which assigns an existing string …

  6. std::basic_string<CharT,Traits,Allocator>::copy - Reference

    Apr 21, 2024 · Copies a substring [pos,pos + count) to character string pointed to by dest. If the requested substring lasts past the end of the string, or if count == npos, the copied substring is …

  7. Tutorial on How to Copy String in C++ - W3Schools

    Learn to copy strings in C++ effectively with our comprehensive tutorial. Understand the usage of C-style character arrays, the strcpy function, and assignment operators to perform C++ string copy …

  8. string - C++ Users

    Copies a substring of the current value of the string object into the array pointed by s. This substring contains the len characters that start at position pos.

  9. strcpy () in C - GeeksforGeeks

    Oct 22, 2025 · The strcpy function in C is used to copy a string, with syntax: strcpy(dest, src);, where dest is the destination array and src is the source string. It returns a pointer to the dest string after …

  10. C strcpy Tutorial: String Copying with Practical Examples - ZetCode

    Apr 8, 2025 · Learn string copying in C with this comprehensive strcpy tutorial. Explore usage, practical examples, and safer alternatives for string operations.