34#if !defined(TRIO_STRING_PUBLIC)
35# define TRIO_STRING_PUBLIC TRIO_PUBLIC
37#if !defined(TRIO_STRING_PRIVATE)
38# define TRIO_STRING_PRIVATE TRIO_PRIVATE
48# define FALSE (1 == 0)
49# define TRUE (! FALSE)
51#if !defined(BOOLEAN_T)
57#elif defined(TRIO_COMPILER_SUPPORTS_C99)
60#elif defined(TRIO_COMPILER_MSVC)
64#if defined(TRIO_PLATFORM_UNIX)
65# define USE_STRCASECMP
66# define USE_STRNCASECMP
67# if defined(TRIO_PLATFORM_SUNOS)
68# define USE_SYS_ERRLIST
72# if defined(TRIO_PLATFORM_QNX)
73# define strcasecmp(x,y) stricmp(x,y)
74# define strncasecmp(x,y,n) strnicmp(x,y,n)
76#elif defined(TRIO_PLATFORM_WIN32)
77# define USE_STRCASECMP
78# if defined(_WIN32_WCE)
79# define strcasecmp(x,y) _stricmp(x,y)
81# define strcasecmp(x,y) strcmpi(x,y)
83#elif defined(TRIO_PLATFORM_OS400)
84# define USE_STRCASECMP
85# define USE_STRNCASECMP
89#if !(defined(TRIO_PLATFORM_SUNOS))
109#if !defined(TRIO_MINIMAL)
117#if defined(TRIO_DOCUMENTATION)
118# include "doc/doc_static.h"
171#if !defined(TRIO_MINIMAL)
198#if !defined(TRIO_MINIMAL)
237#if !defined(TRIO_MINIMAL)
254 return (0 !=
strstr(
string, substring));
259#if !defined(TRIO_MINIMAL)
360#if !defined(TRIO_MINIMAL)
410#if defined(USE_STRCASECMP)
415 if (trio_to_upper(*
first) != trio_to_upper(*second))
455#if !defined(TRIO_MINIMAL)
503#if defined(LC_COLLATE)
506 return trio_equal(
first, second);
533#if defined(USE_STRNCASECMP)
540 if (trio_to_upper(*
first) != trio_to_upper(*second))
566#if defined(USE_STRERROR)
570#elif defined(USE_SYS_ERRLIST)
575 return ((error_number < 0) || (error_number >=
sys_nerr))
587#if !defined(TRIO_MINIMAL) && !defined(_WIN32_WCE)
618#if !defined(TRIO_MINIMAL)
643 while ( (ch = *
string++) !=
NIL )
658#if !defined(TRIO_MINIMAL)
674 return strchr(
string, character);
679#if !defined(TRIO_MINIMAL)
695 return strchr(
string, character);
700#if !defined(TRIO_MINIMAL)
714 return trio_span_function(
target,
target, trio_to_lower);
719#if !defined(TRIO_MINIMAL)
748 if ((trio_to_upper((
int)*
string) != trio_to_upper((
int)*
pattern))
760 if ( trio_match(
string, &
pattern[1]) )
772#if !defined(TRIO_MINIMAL)
813 if ( trio_match_case(
string, &
pattern[1]) )
825#if !defined(TRIO_MINIMAL)
857#if !defined(TRIO_MINIMAL)
875 return strstr(
string, substring);
880#if !defined(TRIO_MINIMAL)
904 size = trio_length(substring);
909 if (trio_equal_max(substring,
size, &
string[
count]))
921#if !defined(TRIO_MINIMAL)
939 return strtok(
string, delimiters);
972#if defined(USE_STRTOLD)
975 int isNegative =
FALSE;
976 int isExponentNegative =
FALSE;
994 : 10 + (trio_to_upper((
int)*
source) -
'A'));
1005 : 10 + (trio_to_upper((
int)*
source) -
'A'));
1013 isExponentNegative = (*
source ==
'-');
1030 isNegative = (*
source ==
'-');
1039 integer += (*
source -
'0');
1049 fraction += (*
source -
'0') * fracdiv;
1062 isExponentNegative = (*
source ==
'-');
1074 value = integer + fraction;
1077 if (isExponentNegative)
1107#if defined(USE_STRTOD)
1110 return (
double)trio_to_long_double(
source, endp);
1114#if !defined(TRIO_MINIMAL)
1130#if defined(USE_STRTOF)
1133 return (
float)trio_to_long_double(
source, endp);
1160#if !defined(TRIO_MINIMAL)
1172#if defined(USE_TOLOWER)
1187#if !defined(TRIO_MINIMAL)
1196trio_to_unsigned_long
1221#if defined(USE_TOUPPER)
1235#if !defined(TRIO_MINIMAL)
1249 return trio_span_function(
target,
target, trio_to_upper);
1261#if defined(TRIO_DOCUMENTATION)
1262# include "doc/doc_dynamic.h"
1318#if !defined(TRIO_MINIMAL)
1340#if !defined(TRIO_MINIMAL)
1357 if (TrioStringGrow(self,
1358 (
size_t)((initial_size > 0) ? initial_size : 1)))
1365 trio_string_destroy(self);
1394#if !defined(TRIO_MINIMAL)
1423 (
void)trio_string_length(self);
1473#if !defined(TRIO_MINIMAL)
1519trio_string_terminate
1523 trio_xstring_append_char(self, 0);
1527#if !defined(TRIO_MINIMAL)
1547 if (!TrioStringGrowTo(self,
length))
1559#if !defined(TRIO_MINIMAL)
1575 if (!TrioStringGrowTo(self,
length))
1591trio_xstring_append_char
1598 if ((
int)self->
length >= trio_string_size(self))
1600 if (!TrioStringGrow(self, 0))
1612#if !defined(TRIO_MINIMAL)
1634#if !defined(TRIO_MINIMAL)
1639trio_xstring_contains
1652#if !defined(TRIO_MINIMAL)
1666 return trio_string_append(self,
other);
1671#if !defined(TRIO_MINIMAL)
1685 return trio_xstring_append(self,
other);
1690#if !defined(TRIO_MINIMAL)
1695trio_string_duplicate
1726trio_xstring_duplicate
1752#if !defined(TRIO_MINIMAL)
1770#if !defined(TRIO_MINIMAL)
1788#if !defined(TRIO_MINIMAL)
1793trio_string_equal_max
1807#if !defined(TRIO_MINIMAL)
1812trio_xstring_equal_max
1826#if !defined(TRIO_MINIMAL)
1831trio_string_equal_case
1844#if !defined(TRIO_MINIMAL)
1849trio_xstring_equal_case
1862#if !defined(TRIO_MINIMAL)
1867trio_string_equal_case_max
1881#if !defined(TRIO_MINIMAL)
1886trio_xstring_equal_case_max
1900#if !defined(TRIO_MINIMAL) && !defined(_WIN32_WCE)
1905trio_string_format_date_max
1919#if !defined(TRIO_MINIMAL)
1931 return trio_index(self->
content, character);
1936#if !defined(TRIO_MINIMAL)
1941trio_string_index_last
1948 return trio_index_last(self->
content, character);
1953#if !defined(TRIO_MINIMAL)
1973#if !defined(TRIO_MINIMAL)
1984 return trio_lower(self->
content);
1989#if !defined(TRIO_MINIMAL)
2007#if !defined(TRIO_MINIMAL)
2025#if !defined(TRIO_MINIMAL)
2030trio_string_match_case
2043#if !defined(TRIO_MINIMAL)
2048trio_xstring_match_case
2061#if !defined(TRIO_MINIMAL)
2066trio_string_substring
2079#if !defined(TRIO_MINIMAL)
2084trio_xstring_substring
2097#if !defined(TRIO_MINIMAL)
2108 return trio_upper(self->
content);
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strtok(char *String, const char *Delimiters)
char * strchr(const char *String, int ch)
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
#define TRIO_ARGS4(list, a1, a2, a3, a4)
#define TRIO_ARGS2(list, a1, a2)
double trio_long_double_t
#define TRIO_ARGS3(list, a1, a2, a3)
#define TRIO_ARGS1(list, a1)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
double pow(double x, double y)
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLuint GLsizei GLsizei * length
TRIO_STRING_PRIVATE trio_string_t * TrioStringAlloc(TRIO_NOARGS)
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
_Check_return_ double __cdecl strtod(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr)
float __cdecl strtof(const char *nptr, char **endptr)
long double __cdecl strtold(const char *__restrict__, char **__restrict__)
const char * strerror(int err)
size_t CDECL strftime(char *str, size_t max, const char *format, const struct tm *mstm)
#define TRIO_REALLOC(x, n)
static TRIO_CONST char rcsid[]
#define TRIO_STRING_PRIVATE
#define TRIO_STRING_PUBLIC