mtext_get_prop_keys(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

mtext_get_prop_keys β€” bestie, this is the one that tells you which text properties are chilling at a specific spot in your M-text πŸ’…


✨ SYNOPSIS ✨

int mtext_get_prop_keys (MText * mt, int pos, MSymbol ** keys)

πŸŽ€ DESCRIPTION πŸŽ€

okay so picture this: you got an M-text, you got a position, and you wanna know which text property keys are living at that exact spot. That's literally what this does 🫢

The mtext_get_prop_keys() function creates an array whose elements are the keys of text properties found at position pos in M-text mt, and sets *keys to the address of the created array.

⚠️ okay this part is IMPORTANT bestie, do not skip: the user is responsible to free the memory allocated for the array. Like, that array is yours now. You made it, you clean it up. No cap. 🧹✨

🌸 RETURN VALUE 🌸

If the operation was successful, mtext_get_prop_keys() returns the length of the key list. Iconic. Slay. That's your count right there πŸ’―

Otherwise it returns -1 and assigns an error code to the external variable merror_code. 😭 Not the vibe, but at least it tells you why.


πŸ’€ ERRORS πŸ’€

  • MERROR_RANGE β€” yeah, that's the one, the range said no πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

Your little prop-having, prop-getting, prop-pushing, prop-popping friend group, fr fr:

  • mtext_get_prop()
  • mtext_put_prop()
  • mtext_put_prop_values()
  • mtext_get_prop_values()
  • mtext_push_prop()
  • mtext_pop_prop()

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 m17n library β€” go get those property keys, you absolute main character πŸ’–βœ¨

πŸ“¦ where this page comes from