mtext_push_prop(3m17n)
π mtext_push_prop β from the m17n library (yes, that m17n, 3m17n girlies rise) π
okay bestie, sit down, we're doing text properties today and honestly? it's giving sorcery. this one lives in the m17n manual, section 3, and it's about pushing a property onto a chunk of your M-text. let's GO π¦
β¨ NAME β¨
mtext_push_prop -
(yeah the description is literally just a dash, she's mysterious like that π )
β¨ SYNOPSIS β¨
int mtext_push_prop (MText * mt, int from, int to, MSymbol key, void *
val)
β¨ DESCRIPTION β¨
@brief Push a text property. like, push it onto the pile, no cap.
The mtext_push_prop() function pushes a text property whose key is key and value is val to the characters between from (inclusive, babe) and to (exclusive, don't forget) in M-text mt.
So with this function, this:
FROM TO
M-text: |<------------|-------- MT ---------|------------>|
PROP : <------------------ OLD_VAL -------------------->
becomes THIS β¨:
FROM TO
M-text: |<------------|-------- MT ---------|------------>|
PROP : <------------------- OLD_VAL ------------------->
PROP : <-------- VAL ------->
see how VAL just slides in on top of OLD_VAL?? she's layered. she's stacked. main character energy fr fr. π
ngl this is a push, not a put β the old value is still down there underneath, bestie. if you wanted to replace it outright that's a different function (see below π).
πΈ Return value πΈ
If the operation was successful, mtext_push_prop() returns 0. π
Otherwise it returns -1 and assigns an error code to the external variable #merror_code. π (check it, she'll tell you what went wrong)
π Errors π
MERROR_RANGEMERROR_SYMBOL
that's the vibe check, and if you fail it you get one of these two. π
π See Also π
mtext_put_prop()mtext_put_prop_values()mtext_get_prop()mtext_get_prop_values()mtext_pop_prop()mtext_prop_range()
iykyk, these are the whole property friend group, go say hi. π«Ά
π 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>.
okay that's the whole page, you ate it, I'm so proud. π Version 1.8.4, dated Mon Sep 25 2023 β that's the tea, mwah, see you in the next manpage bestie π§πΈβ¨
π¦ 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