mtext_put_prop(3m17n)
π mtext_put_prop π
okay bestie, welcome to the mtext_put_prop(3m17n) page from The m17n Library β yes we're doing text properties today and honestly it's giving main character energy β¨
β¨ NAME β¨
mtext_put_prop β set a text property π
πΈ SYNOPSIS πΈ
int mtext_put_prop (MText * mt, int from, int to, MSymbol key, void *
val)
π¦ DESCRIPTION π¦
@brief Set a text property.
so like. the mtext_put_prop() function sets a text property onto the characters between from (inclusive, she's in the club π
) and to (exclusive, sorry babe you're not on the list) inside the M-text mt. and key and val are literally just the key and the value of that text property. no cap.
so before, you've got this whole vibe going:
FROM TO
M-text: |<------------|-------- MT ---------|------------>|
PROP : <------------------ OLD_VAL -------------------->
and then you call this function and it becomes:
FROM TO
M-text: |<------------|-------- MT ---------|------------>|
PROP : <-- OLD_VAL-><-------- VAL -------><-- OLD_VAL-->
periodt. the middle got carved out and replaced with your new VAL, and the OLD_VAL is still living its best life on either side π«Ά iconic behavior fr fr.
π Return value
if everything went slay, mtext_put_prop() returns 0. π
if it did not go slay, it returns -1 and assigns an error code to the external variable merror_code. π so go check that.
π Errors
MERROR_RANGE, MERROR_SYMBOL
π See Also
mtext_put_prop_values()mtext_get_prop()mtext_get_prop_values()mtext_push_prop()mtext_pop_prop()mtext_prop_range()
(go read those too, iykyk π)
π 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 that πβ¨ this was Version 1.8.4, dated Mon Sep 25 2023, and she's filed under mtext_put_prop(3m17n). go forth and set those properties 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