Pixar Arch
Loading...
Searching...
No Matches
vsnprintf.h
Go to the documentation of this file.
1// Copyright 2016 Pixar
2//
3// Licensed under the terms set forth in the LICENSE.txt file available at
4// https://openusd.org/license.
5//
6// Modified by Jeremy Retailleau.
7
8#ifndef PXR_ARCH_VSNPRINTF_H
9#define PXR_ARCH_VSNPRINTF_H
10
13
14#include "./api.h"
15#include "./attributes.h"
16
17#include <stdio.h>
18#include <stdarg.h>
19#include <string>
20
21namespace pxr {
22
35ARCH_API
36int ArchVsnprintf(char *str, size_t size, const char *format, va_list ap)
37#ifndef doxygen
39#endif /* doxygen */
40 ;
41
58ARCH_API
59std::string ArchStringPrintf(const char *fmt, ...)
60#ifndef doxygen
62#endif /* doxygen */
63 ;
64
73ARCH_API
74std::string ArchVStringPrintf(const char *fmt, va_list ap)
75#ifndef doxygen
77#endif /* doxygen */
78 ;
79
80} // namespace pxr
81
82#endif // PXR_ARCH_VSNPRINTF_H
Define function attributes.
#define ARCH_PRINTF_FUNCTION(_fmt, _firstArg)
Macro used to indicate a function takes a printf-like specification.
Definition attributes.h:34
ARCH_API std::string ArchVStringPrintf(const char *fmt, va_list ap)
Returns a string formed by a printf()-like specification.
ARCH_API int ArchVsnprintf(char *str, size_t size, const char *format, va_list ap)
Return the number of characters (not including the null character) necessary for a particular sprintf...
ARCH_API std::string ArchStringPrintf(const char *fmt,...)
Returns a string formed by a printf()-like specification.