48 lines
939 B
Plaintext
48 lines
939 B
Plaintext
G1M_FCSTOMBS(3)
|
|
===============
|
|
Thomas "Cakeisalie5" Touhey
|
|
:Email: thomas@touhey.fr
|
|
:man source: libg1m
|
|
:man manual: libg1m manual
|
|
|
|
NAME
|
|
----
|
|
g1m_fcstombs - convert a FONTCHARACTER string to a multi-byte string
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[source,c]
|
|
----
|
|
#include <libg1m.h>
|
|
|
|
size_t g1m_fcstombs(char *dst, const FONTCHARACTER *src, size_t n);
|
|
----
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
Makes a multi-byte string out of a FONTCHARACTER string. If *dst* is *NULL*,
|
|
only the size will be calculated. Occupies max *n* character, terminating
|
|
zero included.
|
|
|
|
Will end the created string if *n > 0*. If a nul character is found in the
|
|
source string, it will be copied and won't be counted.
|
|
|
|
RETURN VALUE
|
|
------------
|
|
The size of the FONTCHARACTER string.
|
|
|
|
EXAMPLE
|
|
-------
|
|
[source,c]
|
|
----
|
|
size_t len = g1m_fcstombs(NULL, fcs, n);
|
|
char *s = malloc(len + 1);
|
|
if (!s)
|
|
return (malloc_pls);
|
|
g1m_fcstombs(s, fcs, n);
|
|
----
|
|
|
|
SEE ALSO
|
|
--------
|
|
*libg1m*(3), *g1m_mbstofcs*(3)
|