STRCHANGE(3pub)
π NAME π
okay so bestie, meet strchange β it replaces the beginning of a string with the beginning of another string. that's it, that's the whole serve. π
β¨ SYNOPSIS β¨
#include <publib.h>
char *strchange(char *str, size_t changelen,
const char *new, size_t newlen);
π¦ DESCRIPTION π¦
okay so here's the tea, and it's actually pretty simple, no cap π«Ά
strchange takes changelen characters from the beginning of str, and swaps them out for newlen characters from the beginning of new. like, the glow-up happens right at the front of the string.
and then? the rest of str gets moved appropriately so everything still fits together. the leftovers don't get abandoned, they just scoot over. iconic behavior honestly. π§
πΈ RETURN VALUE πΈ
strchange returns its first argument. yes, it hands you back str. it's giving "here's your string back, slightly edited, you're welcome." π
π SEE ALSO π
go read those too bestie, they're in the same friend group fr fr.
π AUTHOR π
this masterpiece was written by Lars Wirzenius (lars.wirzenius@helsinki.fi). we stan. π
and that's the page!! this lil doc came to you courtesy of Publib and the C Programmer's Manual β STRCHANGE(3pub) forever and ever, periodt. πβ¨
π¦ where this page comes from
- debian bookworm: publib-dev 0.40-3+b1 Β· BSD-2-Clause
- debian trixie: publib-dev 0.40-4 Β· BSD-2-Clause
- ubuntu jammy: publib-dev 0.40-3build1 Β· BSD-2-Clause
- ubuntu noble: publib-dev 0.40-3build1 Β· BSD-2-Clause
- ubuntu questing: publib-dev 0.40-4
- ubuntu resolute: publib-dev 0.40-4build1 Β· BSD-2-Clause
- ubuntu stonking: publib-dev 0.40-4build1 Β· BSD-2-Clause
- Copyright (c) 1994-2006 Lars Wirzenius. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms