Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / include / xbt / string.hpp
1 /* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_XBT_STRING_HPP
7 #define SIMGRID_XBT_STRING_HPP
8
9 #include "xbt/base.h"
10
11 #include <cstdarg>
12 #include <cstdlib>
13 #include <string>
14
15 namespace simgrid::xbt {
16
17 /** Create a C++ string from a C-style format
18  *
19  * @ingroup XBT_str
20  */
21 XBT_PUBLIC std::string string_printf(const char* fmt, ...) XBT_ATTRIB_PRINTF(1, 2);
22
23 /** Create a C++ string from a C-style format
24  *
25  * @ingroup XBT_str
26  */
27 XBT_PUBLIC std::string string_vprintf(const char* fmt, va_list ap) XBT_ATTRIB_PRINTF(1, 0);
28
29 } // namespace simgrid::xbt
30 #endif