mtext_get_prop(3m17n)
β¨ mtext_get_prop β¨
okay bestie, so this is a lil page from the m17n Library manual set, and it's all about mtext_get_prop β the function that goes digging for a text property and hands you back its value. it's giving "detective but make it a single character". π
πΈ NAME πΈ
mtext_get_prop β grab the value of the topmost text property at some position, no cap
π SYNOPSIS π
void* mtext_get_prop (MText * mt, int pos, MSymbol key)
π DESCRIPTION π
Get the value of the topmost text property. fr fr, that's the whole vibe.
The mtext_get_prop() function searches the character at pos in M-text mt for the text property whose key is key. like, it walks up to that one character, knocks on the door, and asks "hey do you have a property called key? and what's it holding?"
π¦ RETURN VALUE π¦
If a text property is found, mtext_get_prop() returns the value of the property. If the property has multiple values, it returns the topmost one. If no such property is found, it returns NULL without changing the external variable merror_code. so it's polite about it, it doesn't touch the error code when it's just a plain old not-found. π«Ά
If an error is detected, mtext_get_prop() returns NULL and assigns an error code to the external variable merror_code.
Note π IfNULLis returned without an error, there are two possibilities: - the character atposdoes not have a property whose key iskey, or - the character does have such a property and its value isNULL. If you need to distinguish these two cases, use themtext_get_prop_values()function instead.
like, NULL is doing double duty here and it will NOT tell you which situation you're in. π so if that distinction matters to you (and tbh it might!), go talk to mtext_get_prop_values() instead, she's got the receipts.
π ERRORS π
MERROR_RANGEMERROR_SYMBOL
β SEE ALSO β
mtext_get_prop_values()mtext_put_prop()mtext_put_prop_values()mtext_push_prop()mtext_pop_prop()mtext_prop_range()
the whole property-prop friend group, honestly. 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>.
and that's the whole page, bestie!! π§ this was Version 1.8.4, dated Mon Sep 25 2023, and it lives under the mtext_get_prop(3m17n) name. mwah, go get your property values, ilysm πβ¨
π¦ 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