Welcome to little lamb

Code » limb » master » tree

[master] / src / doc / obuffer.h / obuffer_parse_level.3.md

% limb manual
% obuffer_parse_level(3)
% limb 0.1.0
% 2023-07-24

# NAME

obuffer\_parse\_level - parse a string representing an output level

# SYNOPSIS

    #include <limb/obuffer.h>

```pre hl
u8 obuffer_parse_level(const char *<em>str</em>, size_t <em>len</em>)
```

# DESCRIPTION

The `obuffer_parse_level`() function will scan the content of `str` up to `len`
byte, looking for an output level.

Recognized strings are, in order :

- silent
- quiet
- normal
- verbose
- debug
- maximum

Matching can be partial, according to the rule of [byte_get_match](3).

# RETURN VALUE

The `obuffer_parse_level`() function returns the output level value on success.
Otherwise it returns (u8) -1.