mtext_insert(3m17n)
β¨ mtext_insert β¨
okay bestie, so this is a page from the m17n Library (that's "multilingualization", the whole make-computers-speak-every-language situation) and the function we're stanning today is mtext_insert. π
πΈ NAME πΈ
mtext_insert β literally the "put this text inside that other text" girlie π«Ά
π SYNOPSIS π
int mtext_insert (MText * mt1, int pos, MText * mt2, int from, int to)
π¦ DESCRIPTION π¦
so here's the vibe: you've got an M-text (mt1) and you want to shove a piece of a totally different M-text (mt2) into it. That's it, that's the whole job. π
The mtext_insert() function inserts sub-text of M-text mt2 between from (inclusive, so it's invited to the party π) and to (exclusive, so it's NOT π) into M-text mt1, at position pos.
As a result, mt1 is lengthen by (to - from). (yes, "lengthen", we don't make the rules, the original said it that way, so it stays π)
On insertion, all the text properties of the sub-text of mt2 are inherited. Like, they come along with it. No cap. All of them. π
β RETURN VALUE β
- If the operation was successful,
mtext_insert()returns0. slay! π - Otherwise, it returns
-1and assigns an error code to the external variablemerror_code. π
π ERRORS π
MERROR_MTEXTMERROR_RANGE
not me gettingMERROR_RANGEbecause myfrom/towere doing too much π check your ranges bestie, for real.
π SEE ALSO π
mtext_ins()
π 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 π this was Version 1.8.4, dated Mon Sep 25 2023, from the mtext_insert(3m17n) era β go forth and insert your text with main character energy, periodt. π¦β¨
π¦ 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