aboutsummaryrefslogtreecommitdiffstats
path: root/docs/yaslnew.rst
blob: 8e74f8736b9e0599a2f014a914e1bf15599692da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
:orphan:

yaslnew
=======

Synopsis
--------

.. c:function:: #include <yasl.h>

.. c:function:: yastr yaslauto(const char *init)
                yastr yaslnew(const void *init, size_t initlen)


Description
-----------

The function :c:func:`yaslauto()` creates an yasl string from a C null
terminated string.

The function :c:func:`yaslnew()` is similar to :c:func:`yaslauto()` but instead
of creating the string assuming that the input string is null terminated, it
gets an additional length parameter. This way you can create a string from
binary data.

Return value
------------

Upon successful completion, these functions will allocate and return a new yasl
string. If the allocation fails they will return :c:data:`NULL`.

See also
--------

:manpage:`yasl(3)`