strusBase  0.17
string_format.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
9 #ifndef _STRUS_BASE_STRING_FORMAT_HPP_INCLUDED
10 #define _STRUS_BASE_STRING_FORMAT_HPP_INCLUDED
11 #include <string>
12 #include <cstdlib>
13 #include <stdarg.h>
14 
15 namespace strus {
16 
21 std::string string_format( const char* fmt, va_list ap);
22 
27 #ifdef __GNUC__
28 std::string string_format( const char* fmt, ...) __attribute__ ((format (printf, 1, 2)));
29 #else
30 std::string string_format( const char* fmt, ...);
31 #endif
32 
33 } //namespace
34 #endif
std::string string_format(const char *fmt, va_list ap)
Get a string built from a format string and arguments.