## udev_util

udev_util — utils

## Synopsis

    int                 udev_util_encode_string             (const char *str,
                                                             char *str_enc,
                                                             size_t len);

## Description

## Details

### udev_util_encode_string ()

    int                 udev_util_encode_string             (const char *str,
                                                             char *str_enc,
                                                             size_t len);

Encode all potentially unsafe characters of a string to the corresponding 2 char hex value prefixed by '\x'.

`str` : | input string to be encoded
`str_enc` : | output string to store the encoded input string
`len` : | maximum size of the output string, which may be four times as long as the input string
Returns : | 0 if the entire string was copied, non-zero otherwise.