---
name: "mtext_get_prop"
section: "3m17n"
platform: "linux"
package: "m17n-docs"
version: "1.8.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mtext_get_prop"
---

# mtext\_get\_prop(3m17n)

## NAME

mtext\_get\_prop -

## SYNOPSIS

void\* **mtext\_get\_prop** (**MText** \* *mt*, int *pos*, MSymbol *key*)

## DESCRIPTION

Get the value of the topmost text property. The **mtext\_get\_prop()** function searches the character at **pos** in M-text **mt** for the text property whose key is **key**.

## 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**.

If an error is detected, **mtext\_get\_prop()** returns `NULL` and assigns an error code to the external variable **merror\_code**.

**Note**

If `NULL` is returned without an error, there are two possibilities:

- •

  the character at **pos** does not have a property whose key is **key**, or

- •

  the character does have such a property and its value is `NULL`. \

If you need to distinguish these two cases, use the **mtext\_get\_prop\_values()** function instead. \

## ERRORS

`MERROR_RANGE`, `MERROR_SYMBOL`

## SEE ALSO

**mtext\_get\_prop\_values()**, **mtext\_put\_prop()**, **mtext\_put\_prop\_values()**, **mtext\_push\_prop()**, **mtext\_pop\_prop()**, **mtext\_prop\_range()**\

## 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\>.
