00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ACE_OS_NS_STRING_H
00018 #define ACE_OS_NS_STRING_H
00019
00020 # include "ace/pre.h"
00021
00022 # include "ace/config-lite.h"
00023
00024 # if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 # endif
00027
00028 #include "ace/Basic_Types.h"
00029
00030 #include "ace/ACE_export.h"
00031
00032 #if defined (ACE_EXPORT_MACRO)
00033 # undef ACE_EXPORT_MACRO
00034 #endif
00035 #define ACE_EXPORT_MACRO ACE_Export
00036
00037 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00038
00039 namespace ACE_OS {
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 ACE_NAMESPACE_INLINE_FUNCTION
00052 const void *memchr (const void *s, int c, size_t len);
00053
00054
00055 ACE_NAMESPACE_INLINE_FUNCTION
00056 void *memchr (void *s, int c, size_t len);
00057
00058 #if !defined (ACE_HAS_MEMCHR)
00059
00060 extern ACE_Export
00061 const void *memchr_emulation (const void *s, int c, size_t len);
00062 #endif
00063
00064
00065 ACE_NAMESPACE_INLINE_FUNCTION
00066 int memcmp (const void *t, const void *s, size_t len);
00067
00068
00069 ACE_NAMESPACE_INLINE_FUNCTION
00070 void *memcpy (void *t, const void *s, size_t len);
00071
00072 #if defined (ACE_HAS_MEMCPY_LOOP_UNROLL)
00073
00074
00075
00076
00077
00078 extern ACE_Export
00079 void *fast_memcpy (void *t, const void *s, size_t len);
00080 #endif
00081
00082
00083 ACE_NAMESPACE_INLINE_FUNCTION
00084 void *memmove (void *t, const void *s, size_t len);
00085
00086
00087 ACE_NAMESPACE_INLINE_FUNCTION
00088 void *memset (void *s, int c, size_t len);
00089
00090
00091 ACE_NAMESPACE_INLINE_FUNCTION
00092 char *strcat (char *s, const char *t);
00093
00094 #if defined (ACE_HAS_WCHAR)
00095
00096 ACE_NAMESPACE_INLINE_FUNCTION
00097 wchar_t *strcat (wchar_t *s, const wchar_t *t);
00098 #endif
00099
00100
00101
00102 ACE_NAMESPACE_INLINE_FUNCTION
00103 const char *strchr (const char *s, int c);
00104
00105 #if defined (ACE_HAS_WCHAR)
00106
00107
00108 ACE_NAMESPACE_INLINE_FUNCTION
00109 const wchar_t *strchr (const wchar_t *s, wchar_t c);
00110 #endif
00111
00112
00113 ACE_NAMESPACE_INLINE_FUNCTION
00114 char *strchr (char *s, int c);
00115
00116 #if defined (ACE_HAS_WCHAR)
00117
00118 ACE_NAMESPACE_INLINE_FUNCTION
00119 wchar_t *strchr (wchar_t *s, wchar_t c);
00120 #endif
00121
00122
00123 ACE_NAMESPACE_INLINE_FUNCTION
00124 int strcmp (const char *s, const char *t);
00125
00126
00127 ACE_NAMESPACE_INLINE_FUNCTION
00128 int strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t);
00129
00130
00131 ACE_NAMESPACE_INLINE_FUNCTION
00132 char *strcpy (char *s, const char *t);
00133
00134 #if defined (ACE_HAS_WCHAR)
00135
00136 ACE_NAMESPACE_INLINE_FUNCTION
00137 wchar_t *strcpy (wchar_t *s, const wchar_t *t);
00138 #endif
00139
00140
00141
00142 ACE_NAMESPACE_INLINE_FUNCTION
00143 size_t strcspn (const char *s, const char *reject);
00144
00145 #if defined (ACE_HAS_WCHAR)
00146
00147
00148 ACE_NAMESPACE_INLINE_FUNCTION
00149 size_t strcspn (const wchar_t *s, const wchar_t *reject);
00150 #endif
00151
00152
00153 ACE_NAMESPACE_INLINE_FUNCTION
00154 char *strdup (const char *s);
00155
00156 #if (defined (ACE_LACKS_STRDUP) && !defined(ACE_STRDUP_EQUIVALENT)) \
00157 || defined (ACE_HAS_STRDUP_EMULATION)
00158 extern ACE_Export
00159 char *strdup_emulation (const char *s);
00160 #endif
00161
00162 #if defined (ACE_HAS_WCHAR)
00163
00164 ACE_NAMESPACE_INLINE_FUNCTION
00165 wchar_t *strdup (const wchar_t *s);
00166
00167 #if (defined (ACE_LACKS_WCSDUP) && !defined(ACE_WCSDUP_EQUIVALENT)) \
00168 || defined (ACE_HAS_WCSDUP_EMULATION)
00169 extern ACE_Export
00170 wchar_t *strdup_emulation (const wchar_t *s);
00171 #endif
00172 #endif
00173
00174
00175
00176 extern ACE_Export
00177 char *strecpy (char *des, const char *src);
00178
00179 #if defined (ACE_HAS_WCHAR)
00180
00181
00182 extern ACE_Export
00183 wchar_t *strecpy (wchar_t *s, const wchar_t *t);
00184 #endif
00185
00186
00187
00188
00189
00190
00191 extern ACE_Export
00192 char *strerror (int errnum);
00193
00194 #if defined (ACE_LACKS_STRERROR)
00195
00196 extern ACE_Export
00197 char *strerror_emulation (int errnum);
00198 #endif
00199
00200
00201 ACE_NAMESPACE_INLINE_FUNCTION
00202 size_t strlen (const char *s);
00203
00204
00205 ACE_NAMESPACE_INLINE_FUNCTION
00206 size_t strlen (const ACE_WCHAR_T *s);
00207
00208
00209 ACE_NAMESPACE_INLINE_FUNCTION
00210 char *strncat (char *s, const char *t, size_t len);
00211
00212
00213 ACE_NAMESPACE_INLINE_FUNCTION
00214 ACE_WCHAR_T *strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00215
00216
00217
00218 extern ACE_Export
00219 const char *strnchr (const char *s, int c, size_t len);
00220
00221
00222
00223 extern ACE_Export
00224 const ACE_WCHAR_T *strnchr (const ACE_WCHAR_T *s, ACE_WCHAR_T c, size_t len);
00225
00226
00227 ACE_NAMESPACE_INLINE_FUNCTION
00228 char *strnchr (char *s, int c, size_t len);
00229
00230
00231 ACE_NAMESPACE_INLINE_FUNCTION
00232 ACE_WCHAR_T *strnchr (ACE_WCHAR_T *s, ACE_WCHAR_T c, size_t len);
00233
00234
00235 ACE_NAMESPACE_INLINE_FUNCTION
00236 int strncmp (const char *s, const char *t, size_t len);
00237
00238
00239 ACE_NAMESPACE_INLINE_FUNCTION
00240 int strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00241
00242
00243 ACE_NAMESPACE_INLINE_FUNCTION
00244 char *strncpy (char *s, const char *t, size_t len);
00245
00246
00247 ACE_NAMESPACE_INLINE_FUNCTION
00248 ACE_WCHAR_T *strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259 ACE_NAMESPACE_INLINE_FUNCTION
00260 size_t strnlen (const char *s, size_t maxlen);
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271 ACE_NAMESPACE_INLINE_FUNCTION
00272 size_t strnlen (const ACE_WCHAR_T *s, size_t maxlen);
00273
00274
00275
00276 extern ACE_Export
00277 const char *strnstr (const char *s, const char *t, size_t len);
00278
00279
00280
00281 extern ACE_Export
00282 const ACE_WCHAR_T *strnstr (const ACE_WCHAR_T *s,
00283 const ACE_WCHAR_T *t,
00284 size_t len);
00285
00286
00287 ACE_NAMESPACE_INLINE_FUNCTION
00288 char *strnstr (char *s, const char *t, size_t len);
00289
00290
00291 ACE_NAMESPACE_INLINE_FUNCTION
00292 ACE_WCHAR_T *strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00293
00294
00295 ACE_NAMESPACE_INLINE_FUNCTION
00296 const char *strpbrk (const char *s1, const char *s2);
00297
00298 #if defined (ACE_HAS_WCHAR)
00299
00300 ACE_NAMESPACE_INLINE_FUNCTION
00301 const wchar_t *strpbrk (const wchar_t *s1, const wchar_t *s2);
00302 #endif
00303
00304
00305 ACE_NAMESPACE_INLINE_FUNCTION
00306 char *strpbrk (char *s1, const char *s2);
00307
00308 #if defined (ACE_HAS_WCHAR)
00309
00310 ACE_NAMESPACE_INLINE_FUNCTION
00311 wchar_t *strpbrk (wchar_t *s1, const wchar_t *s2);
00312 #endif
00313
00314 #if defined (ACE_LACKS_STRPBRK)
00315
00316 extern ACE_Export
00317 char *strpbrk_emulation (const char *string,
00318 const char *charset);
00319 #endif
00320
00321
00322
00323 ACE_NAMESPACE_INLINE_FUNCTION
00324 const char *strrchr (const char *s, int c);
00325
00326 #if defined (ACE_HAS_WCHAR)
00327
00328
00329 ACE_NAMESPACE_INLINE_FUNCTION
00330 const wchar_t *strrchr (const wchar_t *s, wchar_t c);
00331 #endif
00332
00333
00334 ACE_NAMESPACE_INLINE_FUNCTION
00335 char *strrchr (char *s, int c);
00336
00337 #if defined (ACE_HAS_WCHAR)
00338
00339 ACE_NAMESPACE_INLINE_FUNCTION
00340 wchar_t *strrchr (wchar_t *s, wchar_t c);
00341 #endif
00342
00343 #if defined (ACE_LACKS_STRRCHR)
00344
00345
00346 extern ACE_Export
00347 char *strrchr_emulation (char *s, int c);
00348
00349
00350
00351 extern ACE_Export
00352 const char *strrchr_emulation (const char *s, int c);
00353 #endif
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371 extern ACE_Export
00372 char *strsncpy (char *dst,
00373 const char *src,
00374 size_t maxlen);
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392 extern ACE_Export
00393 ACE_WCHAR_T *strsncpy (ACE_WCHAR_T *dst,
00394 const ACE_WCHAR_T *src,
00395 size_t maxlen);
00396
00397
00398
00399 ACE_NAMESPACE_INLINE_FUNCTION
00400 size_t strspn (const char *s1, const char *s2);
00401
00402 #if defined (ACE_HAS_WCHAR)
00403
00404
00405 ACE_NAMESPACE_INLINE_FUNCTION
00406 size_t strspn (const wchar_t *s1, const wchar_t *s2);
00407 #endif
00408
00409 #if defined (ACE_LACKS_STRSPN)
00410
00411 extern ACE_Export
00412 size_t strspn_emulation (const char *string,
00413 const char *charset);
00414 #endif
00415
00416
00417
00418 ACE_NAMESPACE_INLINE_FUNCTION
00419 const char *strstr (const char *s, const char *t);
00420
00421 #if defined (ACE_HAS_WCHAR)
00422
00423
00424 ACE_NAMESPACE_INLINE_FUNCTION
00425 const wchar_t *strstr (const wchar_t *s, const wchar_t *t);
00426 #endif
00427
00428
00429 ACE_NAMESPACE_INLINE_FUNCTION
00430 char *strstr (char *s, const char *t);
00431
00432 #if defined (ACE_HAS_WCHAR)
00433
00434 ACE_NAMESPACE_INLINE_FUNCTION
00435 wchar_t *strstr (wchar_t *s, const wchar_t *t);
00436 #endif
00437
00438
00439 ACE_NAMESPACE_INLINE_FUNCTION
00440 char *strtok (char *s, const char *tokens);
00441
00442 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOK)
00443
00444 ACE_NAMESPACE_INLINE_FUNCTION
00445 wchar_t *strtok (wchar_t *s, const wchar_t *tokens);
00446 #endif
00447
00448
00449
00450
00451 ACE_NAMESPACE_INLINE_FUNCTION
00452 char *strtok_r (char *s, const char *tokens, char **lasts);
00453
00454 #if defined (ACE_HAS_WCHAR)
00455
00456 ACE_NAMESPACE_INLINE_FUNCTION
00457 wchar_t *strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts);
00458 #endif // ACE_HAS_WCHAR
00459
00460 #if !defined (ACE_HAS_REENTRANT_FUNCTIONS)
00461
00462 extern ACE_Export
00463 char *strtok_r_emulation (char *s, const char *tokens, char **lasts);
00464 #endif
00465
00466 # if defined (ACE_HAS_WCHAR) && defined(ACE_LACKS_WCSTOK)
00467
00468 extern ACE_Export
00469 wchar_t *strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts);
00470 # endif // ACE_HAS_WCHAR && ACE_LACKS_WCSTOK
00471
00472 }
00473
00474 ACE_END_VERSIONED_NAMESPACE_DECL
00475
00476 # if defined (ACE_HAS_INLINED_OSCALLS)
00477 # if defined (ACE_INLINE)
00478 # undef ACE_INLINE
00479 # endif
00480 # define ACE_INLINE inline
00481 # include "ace/OS_NS_string.inl"
00482 # endif
00483
00484 # include "ace/post.h"
00485 #endif