| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
|---|---|
| 2 | |
| 3 | #include "mos/string.hpp" |
| 4 | |
| 5 | #include <mos_stdio.hpp> |
| 6 | |
| 7 | namespace mos |
| 8 | { |
| 9 | mos::string to_string(const void *value) |
| 10 | { |
| 11 | char buf[32]; |
| 12 | const auto sz = snprintf(str: buf, size: sizeof(buf), format: "%p", value); |
| 13 | return mos::string(buf, sz); |
| 14 | } |
| 15 | } // namespace mos |
| 16 |