mtext_duplicate(3m17n)
π mtext_duplicate β the m17n Library's lil copy-paste bestie π
okay so bestie, this is mtext_duplicate(3m17n) from The m17n Library, and she's here to slice you a fresh copy of some text. no cap. π
β¨ SYNOPSIS β¨
MText* mtext_duplicate (MText * mt, int from, int to)
π¦ DESCRIPTION π¦
so the whole vibe of mtext_duplicate() is: you have an M-text, you want a new M-text that's just a piece of it. boom. that's the function. π
it creates a copy of a sub-text of the M-text mt, starting at from (inclusive, so yes bestie, that index is invited to the party) and ending at to (exclusive, so that index is NOT β it's giving "you're not on the list" energy π).
and here's the part that's actually iconic: the new copy inherits all the text properties of mt. every last one. it's giving nepo baby but make it text properties, and honestly? we love that for it. π
oh and also β super important β mt itself is not modified. we are copying, not mutating. your original stays exactly how you left it. periodt. π«Ά
πΈ RETURN VALUE πΈ
- if everything went slay and the operation was successful,
mtext_duplicate()returns a pointer to the created M-text. β¨ - if an error got detected, it returns
NULLand assigns an error code to the external variablemerror_code. so like, check that variable, bestie, it's literally telling you what went wrong. π
π ERRORS π
MERROR_RANGE
π₯ SEE ALSO π₯
mtext_dup()
π 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, and honestly? she ate. go duplicate something. mwah π
π¦ 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