Commit | Line | Data |
---|---|---|
03d1089e MS |
1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
2 | /* | |
3 | * Copyright 2023 Red Hat | |
4 | */ | |
5 | ||
6 | #ifndef UDS_STRING_UTILS_H | |
7 | #define UDS_STRING_UTILS_H | |
8 | ||
9 | #include <linux/kernel.h> | |
10 | #include <linux/string.h> | |
11 | ||
12 | /* Utilities related to string manipulation */ | |
13 | ||
14 | static inline const char *uds_bool_to_string(bool value) | |
15 | { | |
16 | return value ? "true" : "false"; | |
17 | } | |
18 | ||
19 | /* Append a formatted string to the end of a buffer. */ | |
20 | char *uds_append_to_buffer(char *buffer, char *buf_end, const char *fmt, ...) | |
21 | __printf(3, 4); | |
22 | ||
23 | #endif /* UDS_STRING_UTILS_H */ |