---
name: "thcoll.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/thcoll.h"
---

# thcoll.h(3)

## NAME

thai/thcoll.h -

## Detailed Description

Thai string collation.

## SYNOPSIS

### Functions

int **th\_strcoll** (const **thchar\_t** \*s1, const **thchar\_t** \*s2)\
 *Compare two Thai strings for collation.*  size\_t **th\_strxfrm** (**thchar\_t** dest\[\], const **thchar\_t** \*src, size\_t n)\
 *Transform string into collatable form.*

## Function Documentation

### int th\_strcoll (const thchar\_t \* s1, const thchar\_t \* s2)

Compare two Thai strings for collation.

**Parameters:**

*s1* : first string (null-terminated) \
 *s2* : second string (null-terminated)

**Returns:**

\< 0 if *s1* precedes *s2*; 0 if *s1* equals *s2*; \> 0 if *s1* succeeds *s2*

### size\_t th\_strxfrm (thchar\_t dest\[\], const thchar\_t \* src, size\_t n)

Transform string into collatable form.

**Parameters:**

*dest* : the destination string buffer \
 *src* : the string to transform \
 *n* : the size of *dest* buffer

**Returns:**

the number of bytes required to store the result in *dest*, excluding the terminating '\\0'. If the return value \>= *n*, *dest* is undefined.

Transforms *src* into a form from which comparison using strcmp() yields the same result as that from **th\_strcoll()**. At most *n* characters are put in *dest*.

## Author

Generated automatically by Doxygen for libthai from the source code.
