---
name: "thwbrk.h"
section: "3"
platform: "linux"
package: "libthai-dev"
version: "0.1.6-1+etch1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/thwbrk.h"
---

# thwbrk.h(3)

## NAME

thai/thwbrk.h -

## Detailed Description

Thai wide-char word segmentation.

## SYNOPSIS

### Functions

int **th\_wbrk** (const **thwchar\_t** \*s, int pos\[\], size\_t n)\
 *Find word break positions in Thai wide-char string.*  int **th\_wbrk\_line** (const **thwchar\_t** \*in, **thwchar\_t** \*out, size\_t n, const **thwchar\_t** \*delim)\
 *Insert word delimitors in given wide-char string.*

## Function Documentation

### int th\_wbrk (const thwchar\_t \* s, int pos\[\], size\_t n)

Find word break positions in Thai wide-char string.

**Parameters:**

*s* : the input string to be processed \
 *pos* : array to keep breaking positions \
 *n* : size of *pos*\[\]

**Returns:**

the actual number of breaking positions occurred

Finds word break positions in Thai string *s* and stores at most *n* breaking positions in *pos*\[\], from left to right.

### int th\_wbrk\_line (const thwchar\_t \* in, thwchar\_t \* out, size\_t n, const thwchar\_t \* delim)

Insert word delimitors in given wide-char string.

**Parameters:**

*in* : the input wide-char string to be processed \
 *out* : the output wide-char buffer \
 *n* : the size of *out* (as number of elements) \
 *delim* : the wide-char word delimitor to insert

**Returns:**

the actual size of the processed string (as number of elements)

Analyzes the input string and store the string in output buffer with the given word delimitor inserted at every word boundary.

## Author

Generated automatically by Doxygen for libthai from the source code.
