12#include "attributes.h"
15#ifdef __MINGW_PRINTF_FORMAT
16 #define BUILTIN_PRINTF_FORMAT __MINGW_PRINTF_FORMAT
18 #define BUILTIN_PRINTF_FORMAT printf
25#define PRINTF_FORMAT( i, j ) FORMAT( BUILTIN_PRINTF_FORMAT, i, j)
27 char *
strnstr(
const char *haystack,
const char *needle,
size_t size );
28 char *
strcasestr(
const char *haystack,
const char *needle );
29char*
strndup(
const char *s,
size_t n );
31PRINTF_FORMAT( 2, 3 ) int
asprintf(
char** strp, const
char* fmt, ... );
32PRINTF_FORMAT( 2, 0 )
int vasprintf(
char** strp, const
char* fmt, va_list ap );
33PRINTF_FORMAT( 3, 4 )
int scnprintf(
char* text,
size_t maxlen, const
char* fmt, ... );
35int strsort( const
void *p1, const
void *p2 );
39int num2str(
char dest[NUM2STRLEN],
double n,
int decimals );
40const char*
num2strU(
double n,
int decimals );
int asprintf(char **strp, const char *fmt,...)
Like sprintf(), but it allocates a large-enough string and returns the pointer in the first argument....
int num2str(char dest[NUM2STRLEN], double n, int decimals)
Converts an electronic warfare value to a string.
int vasprintf(char **strp, const char *fmt, va_list ap)
Like vsprintf(), but it allocates a large-enough string and returns the pointer in the first argument...
char * strnstr(const char *haystack, const char *needle, size_t size)
A bounded version of strstr. Conforms to BSD semantics.
int strsort(const void *p1, const void *p2)
Sort function for sorting strings with qsort().
char * strcasestr(const char *haystack, const char *needle)
Finds a string inside another string case insensitively.
int scnprintf(char *text, size_t maxlen, const char *fmt,...)
Like snprintf(), but returns the number of characters ACTUALLY "printed" into the buffer....
int strsort_reverse(const void *p1, const void *p2)
Order-reversed version of strsort().
char * strndup(const char *s, size_t n)
Return a pointer to a new string, which is a duplicate of the string s (or, if necessary,...
const char * num2strU(double n, int decimals)
Unsafe version of num2str that uses an internal buffer. Every call overwrites the return value.