mtext_ncpy(3m17n)
π mtext_ncpy β the m17n library's lil copy-paste bestie π
okay so bestie, this is mtext_ncpy(3m17n), part of the m17n library, and it's literally the "copy exactly this many characters please" function. no cap. it's giving clipboard energy but make it precise. π
β¨ SYNOPSIS β¨
MText* mtext_ncpy (MText * mt1, MText * mt2, int n)
πΈ DESCRIPTION πΈ
so what it does is copy the first some characters from one M-text into another. specifically, mtext_ncpy() copies the first n characters of the M-text mt2 into the M-text mt1, and while it does that it inherits all the text properties β yes, all of them, it brings the whole vibe along. π¦
and if mt2 is shorter than n? no drama, it just copies all the characters of mt2. like, it copies what's there, it doesn't invent characters, that would be wild. π
the old text sitting in mt1 gets overwritten (rip to the previous contents fr fr) and the length of mt1 gets extended if it needs to be, so it can actually hold everything.
and mt2? mt2 is not modified. it's just the donor, it walks away untouched, main character energy. π
π RETURN VALUE π
if everything went good, mtext_ncpy() returns a pointer to the resulting M-text mt1. slay. π«Ά
if an error gets detected, it returns NULL and assigns an error code to the global variable merror_code. so like, check that. π
π ERRORS π
MERROR_RANGE
π₯ SEE ALSO π₯
mtext_cpy()mtext_copy()
π COPYRIGHT π
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.
and that's the whole page bestie, Version 1.8.4, dated Mon Sep 25 2023 β mwah, go copy some characters responsibly πβ¨
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms