---
name: "nextwctype"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["freebsd", "macos"]
url: "https://new.carta.tech/nextwctype"
---

# nextwctype(3)

iterate through character classes

## NAME

**nextwctype**, **nextwctype\_l** – iterate through character classes

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<wctype.h\>**

*wint\_t*\

**nextwctype**(*wint\_t ch*, *wctype\_t wct*);

**#include \<xlocale.h\>**

*wint\_t*\

**nextwctype\_l**(*wint\_t ch*, *wctype\_t wct*, *locale\_t loc*);

## DESCRIPTION

The **nextwctype**() function determines the next character after *ch* that is a member of character class *wct*. If *ch* is -1, the search begins at the first member of *wct*.

While the **nextwctype**() function uses the current locale, the\
  .Fn nextwctype\_l function may be passed a locale directly. See [xlocale(3)](/xlocale/3.md) for more information.

## RETURN VALUES

The **nextwctype**() function returns the next character, or -1 if there are no more.

## COMPATIBILITY

This function is a non-standard FreeBSD extension and should not be used where the standard **iswctype**() function would suffice.

## SEE ALSO

[wctype(3)](/wctype/3.md), [xlocale(3)](/xlocale/3.md)

## HISTORY

The **nextwctype**() function appeared in FreeBSD 5.4.
