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

# mtext\_tok(3m17n)

## NAME

mtext\_tok -

## SYNOPSIS

**MText**\* **mtext\_tok** (**MText** \* *mt*, **MText** \* *delim*, int \* *pos*)

## DESCRIPTION

Look for a token in an M-text. The **mtext\_tok()** function searches a token that firstly occurs after position **pos** in M-text **mt**. Here, a token means a substring each of which does not appear in M-text **delim**. Note that the type of **pos** is not `int` but pointer to `int`.

## RETURN VALUE

If a token is found, **mtext\_tok()** copies the corresponding part of **mt** and returns a pointer to the copy. In this case, **pos** is set to the end of the found token. If no token is found, it returns `NULL` without changing the external variable **merror\_code**. If an error is detected, it returns `NULL` and assigns an error code to the external variable **merror\_code**. \

## ERRORS

`MERROR_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\>.
