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

# mtext\_cmp(3m17n)

## NAME

mtext\_cmp -

## SYNOPSIS

int **mtext\_cmp** (**MText** \* *mt1*, **MText** \* *mt2*)

## DESCRIPTION

Compare two M-texts character-by-character. The **mtext\_cmp()** function compares M-texts **mt1** and **mt2** character by character.

## RETURN VALUE

This function returns 1, 0, or -1 if **mt1** is found greater than, equal to, or less than **mt2**, respectively. Comparison is based on character codes. \

## SEE ALSO

**mtext\_ncmp()**, **mtext\_casecmp()**, **mtext\_ncasecmp()**, **mtext\_compare()**, **mtext\_case\_compare()**\

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