MOS Source Code
Loading...
Searching...
No Matches
string.cpp
Go to the documentation of this file.
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
(buf,
sizeof
(buf),
"%p"
, value);
13
return
mos::string
(buf, sz);
14
}
15
}
// namespace mos
mos_stdio.hpp
mos
Definition
allocator.hpp:10
mos::to_string
mos::string to_string(const void *value)
Definition
string.cpp:9
mos::string
mos::basic_string< char, mos::default_allocator > string
Definition
string.hpp:352
string.hpp
snprintf
int snprintf(char *__restrict str, size_t size, const char *__restrict format,...)
Definition
mos_stdio.cpp:16
kernel
lib
string.cpp
Generated on Sat Mar 1 2025 10:32:59 for MOS Source Code by
1.13.2