STRCOPY(3)
π STRCOPY(3) π
ok so bestie, welcome to the Library Functions Manual β section 3, we're in the library functions section, it's giving very much "C standard library adjacent" energy and honestly? iconic. β¨
πΈ NAME πΈ
strcopy β copy strings π
like, that's the whole job. copying. strings. periodt.
π¦ SYNOPSIS π¦
char* strcopy(char* a, char* b)
so you call it with two char*s and it hands you back a char* β keep that in mind, we'll get to why in a sec π
β¨ DESCRIPTION β¨
okay so here's the tea, bestie: strcopy copies the nul-terminated string b into a. π«Ά
that's it. b goes in, a comes out the other side looking like b. no cap. the string b is nul-terminated (iykyk, there's a 0 chillin' at the end holding it all together π), and it gets copied into a.
and the return value? listen β this is the cute part β it returns a pointer to the 0 character in a. π not a pointer to the start of a, not the length, not a bool, just... straight to the nul. main character energy honestly. the 0 character said "I am the destination" and strcopy said "say less." π
so like:
- it copies the nul-terminated string
bintoaβ - it returns a pointer to the
0character inaβ
that's the entire vibe. lowkey obsessed with how unbothered this function is. π
π₯ SEE ALSO π₯
strcpy(3)β the cousin. the relative. go say hi. π
π real talk bestie: this page does not tell you anything about buffer sizes, overlap, or what happens if things go sideways β so don't go assuming. stick to exactly what's written here and you'll stay slaying. π§
and that's the whole page, mwah π
sign-off time, bestie: this little gem lives in the Library Functions Manual, page STRCOPY(3) β that's the title and the footer up in the corner, doing its little double duty, and no date in sight so we're just gonna call it β¨timelessβ¨. bye bestie, go copy some strings responsibly ππ π¦
π¦ where this page comes from
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms