Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

OS_String.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //=============================================================================
00003 /**
00004  *  @file   OS_String.h
00005  *
00006  *  $Id: OS_String.h,v 1.1.1.3.2.1 2003/04/10 14:12:29 phil Exp $
00007  *
00008  *  @brief  Contains definition of class ACE_OS_String.
00009  *
00010  *  @author Doug Schmidt <schmidt@cs.wustl.edu>
00011  *  @author Jesper S. M|ller <stophph@diku.dk>
00012  *  @author and a cast of thousands...
00013  */
00014 //=============================================================================
00015 
00016 #ifndef ACE_OS_STRING_H
00017 #define ACE_OS_STRING_H
00018 #include "ace/pre.h"
00019 
00020 #include "ace/OS_Export.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "ace/Basic_Types.h"
00027 
00028 #if !defined (ACE_HAS_WINCE)
00029 #include <stddef.h>
00030 #endif  // ACE_HAS_WINCE
00031 
00032 #if defined (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB) && \
00033             (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB != 0)
00034 using std::size_t;
00035 using std::wint_t;
00036 #endif /* ACE_USES_STD_NAMESPACE_FOR_STDC_LIB */
00037 
00038 /**
00039  *  @class ACE_OS_String
00040  *
00041  *  @brief This class includes functions available in string.h and ctype.h.
00042  */
00043 class ACE_OS_Export ACE_OS_String
00044 {
00045 public:
00046   /** @name Functions from <cstring>
00047    *
00048    *  Included are the functions defined in <cstring> and their <cwchar>
00049    *  equivalents.
00050    *
00051    *  @todo To be complete, we should add strcoll, and strxfrm.
00052    */
00053   //@{
00054 
00055   /// Finds characters in a buffer (const void version).
00056   static const void *memchr (const void *s, int c, size_t len);
00057 
00058   /// Finds characters in a buffer (void version).
00059   static void *memchr (void *s, int c, size_t len);
00060 
00061   /// Compares two buffers.
00062   static int memcmp (const void *t, const void *s, size_t len);
00063 
00064   /// Copies one buffer to another.
00065   static void *memcpy (void *t, const void *s, size_t len);
00066 
00067   /// Moves one buffer to another.
00068   static void *memmove (void *t, const void *s, size_t len);
00069 
00070   /// Fills a buffer with a character value.
00071   static void *memset (void *s, int c, size_t len);
00072 
00073   /// Appends a string to another string (char version).
00074   static char *strcat (char *s, const char *t);
00075 
00076 #if defined (ACE_HAS_WCHAR)
00077   /// Appends a string to another string (wchar_t version).
00078   static wchar_t *strcat (wchar_t *s, const wchar_t *t);
00079 #endif /* ACE_HAS_WCHAR */
00080 
00081   /// Finds the first occurance of a character in a string (const char
00082   /// version).
00083   static const char *strchr (const char *s, int c);
00084 
00085 #if defined (ACE_HAS_WCHAR)
00086   /// Finds the first occurance of a character in a string (const wchar_t
00087   /// version).
00088   static const wchar_t *strchr (const wchar_t *s, wint_t c);
00089 #endif /* ACE_HAS_WCHAR */
00090 
00091   /// Finds the first occurance of a character in a string (char version).
00092   static char *strchr (char *s, int c);
00093 
00094 #if defined (ACE_HAS_WCHAR)
00095   /// Finds the first occurance of a character in a string (wchar_t version).
00096   static wchar_t *strchr (wchar_t *s, wint_t c);
00097 #endif /* ACE_HAS_WCHAR */
00098 
00099   /// Compares two strings (char version).
00100   static int strcmp (const char *s, const char *t);
00101 
00102   /// Compares two strings (wchar_t version).
00103   static int strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t);
00104 
00105   /// Copies a string (char version).
00106   static char *strcpy (char *s, const char *t);
00107 
00108 #if defined (ACE_HAS_WCHAR)
00109   /// Copies a string (wchar_t version).
00110   static wchar_t *strcpy (wchar_t *s, const wchar_t *t);
00111 #endif /* ACE_HAS_WCHAR */
00112 
00113   /// Searches for the first substring without any of the specified
00114   /// characters and returns the size of the substring (char version).
00115   static size_t strcspn (const char *s, const char *reject);
00116 
00117 #if defined (ACE_HAS_WCHAR)
00118   /// Searches for the first substring without any of the specified
00119   /// characters and returns the size of the substring (wchar_t version).
00120   static size_t strcspn (const wchar_t *s, const wchar_t *reject);
00121 #endif /* ACE_HAS_WCHAR */
00122 
00123   /// Returns a system error message.
00124   static char *strerror (int errnum);
00125 
00126   /// Finds the length of a string (char version).
00127   static size_t strlen (const char *s);
00128 
00129   /// Finds the length of a string (ACE_WCHAR_T version).
00130   static size_t strlen (const ACE_WCHAR_T *s);
00131 
00132   /// Finds the length of a limited-length string (char version).
00133   /**
00134    * @param s       The character string to find the length of.
00135    * @param maxlen  The maximum number of characters that will be
00136    *                scanned for the terminating nul character.
00137    *
00138    * @return The length of @arg s, if the terminating nul character
00139    *         is located, else @arg maxlen.
00140    */
00141   static size_t strnlen (const char *s, size_t maxlen);
00142 
00143   /// Finds the length of a limited-length string (ACE_WCHAR_T version).
00144   /**
00145    * @param s       The character string to find the length of.
00146    * @param maxlen  The maximum number of characters that will be
00147    *                scanned for the terminating nul character.
00148    *
00149    * @return The length of @arg s, if the terminating nul character
00150    *         is located, else @arg maxlen.
00151    */
00152   static size_t strnlen (const ACE_WCHAR_T *s, size_t maxlen);
00153 
00154   /// Appends part of a string to another string (char version).
00155   static char *strncat (char *s, const char *t, size_t len);
00156 
00157   /// Appends part of a string to another string (wchar_t version).
00158   static ACE_WCHAR_T *strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00159 
00160   /// Compares two arrays (char version).
00161   static int strncmp (const char *s, const char *t, size_t len);
00162 
00163   /// Compares two arrays (wchar_t version).
00164   static int strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00165 
00166   /// Copies an array (char version)
00167   static char *strncpy (char *s, const char *t, size_t len);
00168 
00169   /// Copies an array (ACE_WCHAR_T version)
00170   static ACE_WCHAR_T *strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00171 
00172   /// Searches for characters in a string (const char version).
00173   static const char *strpbrk (const char *s1, const char *s2);
00174 
00175 #if defined (ACE_HAS_WCHAR)
00176   /// Searches for characters in a string (const wchar_t version).
00177   static const wchar_t *strpbrk (const wchar_t *s1, const wchar_t *s2);
00178 #endif /* ACE_HAS_WCHAR */
00179 
00180   /// Searches for characters in a string (char version).
00181   static char *strpbrk (char *s1, const char *s2);
00182 
00183 #if defined (ACE_HAS_WCHAR)
00184   /// Searches for characters in a string (wchar_t version).
00185   static wchar_t *strpbrk (wchar_t *s1, const wchar_t *s2);
00186 #endif /* ACE_HAS_WCHAR */
00187 
00188   /// Finds the last occurance of a character in a string (const char
00189   /// version).
00190   static const char *strrchr (const char *s, int c);
00191 
00192 #if defined (ACE_HAS_WCHAR)
00193   /// Finds the last occurance of a character in a string (const wchar_t
00194   /// version).
00195   static const wchar_t *strrchr (const wchar_t *s, wint_t c);
00196 #endif /* ACE_HAS_WCHAR */
00197 
00198   /// Finds the last occurance of a character in a string (char version).
00199   static char *strrchr (char *s, int c);
00200 
00201 #if defined (ACE_HAS_WCHAR)
00202   /// Finds the last occurance of a character in a string (wchar_t version).
00203   static wchar_t *strrchr (wchar_t *s, wint_t c);
00204 #endif /* ACE_HAS_WCHAR */
00205 
00206   /// Searches for the first substring containing only the specified
00207   /// characters and returns the size of the substring (char version).
00208   static size_t strspn (const char *s1, const char *s2);
00209 
00210 #if defined (ACE_HAS_WCHAR)
00211   /// Searches for the first substring containing only the specified
00212   /// characters and returns the size of the substring (wchar_t version).
00213   static size_t strspn (const wchar_t *s1, const wchar_t *s2);
00214 #endif /* ACE_HAS_WCHAR */
00215 
00216   /// Finds the first occurance of a substring in a string (const char
00217   /// version).
00218   static const char *strstr (const char *s, const char *t);
00219 
00220 #if defined (ACE_HAS_WCHAR)
00221   /// Finds the first occurance of a substring in a string (const wchar_t
00222   /// version).
00223   static const wchar_t *strstr (const wchar_t *s, const wchar_t *t);
00224 #endif /* ACE_HAS_WCHAR */
00225 
00226   /// Finds the first occurance of a substring in a string (char version).
00227   static char *strstr (char *s, const char *t);
00228 
00229 #if defined (ACE_HAS_WCHAR)
00230   /// Finds the first occurance of a substring in a string (wchar_t version).
00231   static wchar_t *strstr (wchar_t *s, const wchar_t *t);
00232 #endif /* ACE_HAS_WCHAR */
00233 
00234   /// Finds the next token in a string (char version).
00235   static char *strtok (char *s, const char *tokens);
00236 
00237 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOK)
00238   /// Finds the next token in a string (wchar_t version).
00239   static wchar_t *strtok (wchar_t *s, const wchar_t *tokens);
00240 #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOK */
00241 
00242   //@}
00243 
00244   /** @name Functions from <cctype>
00245    *
00246    *  Included are the functions defined in <cctype> and their <cwctype>
00247    *  equivalents.
00248    *
00249    *  Since they are often implemented as macros, we don't use the same name
00250    *  here.  Instead, we change by prepending "ace_" (with the exception of
00251    *  to_lower).
00252    *
00253    *  @todo To be complete, we should add: isalnum, isalpha, iscntrl
00254    *  isdigit, isgraph, islower, ispunct, isupper, isxdigit, and toupper.
00255    */
00256   //@{
00257 
00258   /// Returns true if the character is a printable character.
00259   static int ace_isprint (const ACE_TCHAR c);
00260 
00261   /// Returns true if the character is a space character.
00262   static int ace_isspace (const ACE_TCHAR c);
00263 
00264   /// Converts a character to lower case (char version).
00265   static int to_lower (int c);
00266 
00267 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWLOWER)
00268   /// Converts a character to lower case (wchar_t version).
00269   static wint_t to_lower (wint_t c);
00270 #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWLOWER */
00271 
00272   //@}
00273 
00274   /** @name Non-standard functions
00275    *
00276    *  These functions aren't in the standard.
00277    *
00278    */
00279   //@{
00280 
00281   /// Converts an integer to a string.
00282   static char *itoa (int value, char *string, int radix);
00283 
00284 #if defined (ACE_HAS_WCHAR)
00285   /// Converts an integer to a string.
00286   static wchar_t *itoa (int value, wchar_t *string, int radix);
00287 #endif /* ACE_HAS_WCHAR */
00288 
00289   /// Compares two strings (case insensitive const char version).
00290   static int strcasecmp (const char *s, const char *t);
00291 
00292 #if defined (ACE_HAS_WCHAR)
00293   /// Compares two strings (case insensitive const wchar_t version).
00294   static int strcasecmp (const wchar_t *s, const wchar_t *t);
00295 #endif /* ACE_HAS_WCHAR */
00296 
00297   /// Finds the first occurance of a character in an array (const char
00298   /// version).
00299   static const char *strnchr (const char *s, int c, size_t len);
00300 
00301   /// Finds the first occurance of a character in an array (const ACE_WCHAR_T
00302   /// version).
00303   static const ACE_WCHAR_T *strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len);
00304 
00305   /// Finds the first occurance of a character in an array (char version).
00306   static char *strnchr (char *s, int c, size_t len);
00307 
00308   /// Finds the first occurance of a character in an array (ACE_WCHAR_T version).
00309   static ACE_WCHAR_T *strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len);
00310 
00311   /// Compares two arrays (case insensitive const char version).
00312   static int strncasecmp (const char *s, const char *t, size_t len);
00313 
00314 #if defined (ACE_HAS_WCHAR)
00315   /// Compares two arrays (case insensitive const wchar_t version).
00316   static int strncasecmp (const wchar_t *s, const wchar_t *t, size_t len);
00317 #endif /* ACE_HAS_WCHAR */
00318 
00319   /// Copies a string, but returns a pointer to the end of the
00320   /// copied region (char version).
00321   static char *strecpy (char *des, const char *src);
00322 
00323 #if defined (ACE_HAS_WCHAR)
00324   /// Copies a string, but returns a pointer to the end of the
00325   /// copied region (wchar_t version).
00326   static wchar_t *strecpy (wchar_t *s, const wchar_t *t);
00327 #endif /* ACE_HAS_WCHAR */
00328 
00329   /// This is a "safe" c string copy function (char version).
00330   /**
00331    * Unlike strncpy() this function will always add a terminating '\0'
00332    * char if maxlen > 0.  So the user doesn't has to provide an extra
00333    * '\0' if the user wants a '\0' terminated dst.  The function
00334    * doesn't check for a 0 <dst>, because this will give problems
00335    * anyway.  When <src> is 0 an empty string is made.  We do not
00336    * "touch" *<dst> if maxlen is 0.  Returns <dst>.  Care should be
00337    * taken when replacing strncpy() calls, because in some cases a
00338    * strncpy() user is using the "not '\0' terminating" feature from
00339    * strncpy().  This happens most when the call to strncpy() was
00340    * optimized by using a maxlen which is 1 smaller than the size
00341    * because there's always written a '\0' inside this last position.
00342    * Very seldom it's possible that the '\0' padding feature from
00343    * strncpy() is needed.
00344    */
00345   static char *strsncpy (char *dst,
00346                          const char *src,
00347                          size_t maxlen);
00348 
00349   /// This is a "safe" c string copy function (wchar_t version).
00350   /**
00351    * Unlike strncpy() this function will always add a terminating '\0'
00352    * char if maxlen > 0.  So the user doesn't has to provide an extra
00353    * '\0' if the user wants a '\0' terminated dst.  The function
00354    * doesn't check for a 0 <dst>, because this will give problems
00355    * anyway.  When <src> is 0 an empty string is made.  We do not
00356    * "touch" *<dst> if maxlen is 0.  Returns <dst>.  Care should be
00357    * taken when replacing strncpy() calls, because in some cases a
00358    * strncpy() user is using the "not '\0' terminating" feature from
00359    * strncpy().  This happens most when the call to strncpy() was
00360    * optimized by using a maxlen which is 1 smaller than the size
00361    * because there's always written a '\0' inside this last position.
00362    * Very seldom it's possible that the '\0' padding feature from
00363    * strncpy() is needed.
00364    */
00365   static ACE_WCHAR_T *strsncpy (ACE_WCHAR_T *dst,
00366                                 const ACE_WCHAR_T *src,
00367                                 size_t maxlen);
00368 
00369   /// Finds the first occurance of a substring in an array (const char
00370   /// version).
00371   static const char *strnstr (const char *s, const char *t, size_t len);
00372 
00373   /// Finds the first occurance of a substring in an array (const wchar_t
00374   /// version).
00375   static const ACE_WCHAR_T *strnstr (const ACE_WCHAR_T *s,
00376                                      const ACE_WCHAR_T *t,
00377                                      size_t len);
00378 
00379   /// Finds the first occurance of a substring in an array (char version).
00380   static char *strnstr (char *s, const char *t, size_t len);
00381 
00382   /// Finds the first occurance of a substring in an array (wchar_t version).
00383   static ACE_WCHAR_T *strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00384 
00385   /// Returns a malloced duplicated string (char version).
00386   static char *strdup (const char *s);
00387 
00388 #if defined (ACE_HAS_WCHAR)
00389   /// Returns a malloced duplicated string (wchar_t version).
00390   static wchar_t *strdup (const wchar_t *s);
00391 #endif /* ACE_HAS_WCHAR */
00392 
00393   /// Finds the next token in a string (safe char version).
00394   static char *strtok_r (char *s, const char *tokens, char **lasts);
00395 
00396 #if defined (ACE_HAS_WCHAR)
00397   /// Finds the next token in a string (wchar_t version).
00398   static wchar_t *strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts);
00399 #endif  // ACE_HAS_WCHAR
00400 
00401 #if !defined (ACE_LACKS_STRTOD)
00402   /// Converts a string to a double value (char version).
00403   static double strtod (const char *s, char **endptr);
00404 #endif /* !ACE_LACKS_STRTOD */
00405 
00406 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOD)
00407   /// Converts a string to a double value (wchar_t version).
00408   static double strtod (const wchar_t *s, wchar_t **endptr);
00409 #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOD */
00410 
00411   /// Converts a string to a long value (char version).
00412   static long strtol (const char *s, char **ptr, int base);
00413 
00414 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOL)
00415   /// Converts a string to a long value (wchar_t version).
00416   static long strtol (const wchar_t *s, wchar_t **ptr, int base);
00417 #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOL */
00418 
00419   /// Converts a string to an unsigned long value (char version).
00420   static unsigned long strtoul (const char *s, char **ptr, int base);
00421 
00422 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOUL)
00423   /// Converts a string to an unsigned long value (wchar_t version).
00424   static unsigned long strtoul (const wchar_t *s, wchar_t **ptr, int base);
00425 #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOUL */
00426 
00427   //@}
00428 
00429 private:
00430 
00431   /** @name Emulation
00432    *
00433    *  These methods are provided for platforms that do not have a native
00434    *  implementation.
00435    */
00436   //@{
00437 
00438 #if !defined (ACE_HAS_ITOA)
00439   /// Emulated itoa - Converts an integer to a string.
00440   static char *itoa_emulation (int value, char *string, int radix);
00441 #endif /* !ACE_HAS_ITOA */
00442 
00443 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_ITOW)
00444   /// Emulated itow - Converts an integer to a string.
00445   static wchar_t *itow_emulation (int value, wchar_t *string, int radix);
00446 #endif /* ACE_HAS_WCHAR && ACE_LACKS_ITOW */
00447 
00448 #if !defined (ACE_HAS_MEMCHR)
00449   /// Emulated memchr - Finds a character in a buffer.
00450   static const void *memchr_emulation (const void *s, int c, size_t len);
00451 #endif /* ACE_HAS_MEMCHR */
00452 
00453 #if defined (ACE_LACKS_STRCASECMP)
00454   /// Emulated strcasecmp - Performs a case insensitive comparison of strings.
00455   static int strcasecmp_emulation (const char *s, const char *t);
00456 
00457   /// Emulated strncasecmp - Performs a case insensitvie comparison of arrays.
00458   static int strncasecmp_emulation (const char *s, const char *t, size_t len);
00459 #endif /* ACE_LACKS_STRCASECMP */
00460 
00461 #if defined (ACE_LACKS_STRCSPN)
00462   /// Emulated strcspn - Finds a substring in a string.
00463   static size_t strcspn_emulation (const char *s, const char *reject);
00464 #endif /* ACE_LACKS_STRCSPN */
00465 
00466 #if defined (ACE_LACKS_STRCHR)
00467   /// Emulated strchr (char version) - Finds the first occurance of a
00468   /// character in a string.
00469   static char *strchr_emulation (char *s, int c);
00470 
00471   /// Emulated strchr (const char version) - Finds the first occurance of a
00472   /// character in a string.
00473   static const char *strchr_emulation (const char *s, int c);
00474 #endif /* ACE_LACKS_STRCHR */
00475 
00476 #if defined (ACE_LACKS_STRERROR)
00477   /// Emulated strerror - Returns a system error message.
00478   static char *strerror_emulation (int errnum);
00479 #endif /* ACE_LACKS_STRERROR */
00480 
00481 #if defined (ACE_LACKS_STRPBRK)
00482   /// Emulated strpbrk - Searches for characters in a string.
00483   static char *strpbrk_emulation (const char *string,
00484                                   const char *charset);
00485 #endif /* ACE_LACKS_STRPBRK */
00486 
00487 #if defined (ACE_LACKS_STRRCHR)
00488   /// Emulated strrchr (char version) - Finds the last occurance of a
00489   /// character in a string.
00490   static char *strrchr_emulation (char *s, int c);
00491 
00492   /// Emulated strrchr (const char version) - Finds the last occurance of a
00493   /// character in a string.
00494   static const char *strrchr_emulation (const char *s, int c);
00495 #endif /* ACE_LACKS_STRRCHR */
00496 
00497 #if !defined (ACE_HAS_REENTRANT_FUNCTIONS)
00498   /// Emulated strtok_r.
00499   static char *strtok_r_emulation (char *s, const char *tokens, char **lasts);
00500 
00501 # if defined (ACE_HAS_WCHAR)
00502   /// Emulated strtok_r (wchar_t version).
00503   static wchar_t *strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts);
00504 # endif  // ACE_HAS_WCHAR
00505 #endif /* !ACE_HAS_REENTRANT_FUNCTIONS */
00506 
00507 #if defined (ACE_LACKS_STRSPN)
00508   /// Emulated wcsspn.
00509   static size_t strspn_emulation (const char *string,
00510                                   const char *charset);
00511 #endif /* ACE_LACKS_STRSPN */
00512 
00513 #if defined (ACE_LACKS_STRTOL)
00514   static long strtol_emulation (const char *nptr, char **endptr, int base);
00515 #endif /* ACE_LACKS_STRTOL */
00516 
00517 #if defined (ACE_LACKS_STRTOUL)
00518   static unsigned long strtoul_emulation (const char *nptr,
00519                                           char **endptr,
00520                                           int base);
00521 #endif /* ACE_LACKS_STRTOUL */
00522 
00523 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCAT)
00524   /// Emulated wcscat - Appends a string.
00525   static wchar_t *wcscat_emulation (wchar_t *destination,
00526                                     const wchar_t *source);
00527 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCAT */
00528 
00529 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCHR)
00530   /// Emulated wcschr - Finds a character in a string.
00531   static wchar_t *wcschr_emulation (const wchar_t *string, wint_t c);
00532 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCHR */
00533 
00534 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP)
00535   /// Emulated wcscmp - Compares strings.
00536   static int wcscmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2);
00537 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCMP */
00538 
00539 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCPY)
00540   /// Emulated wcscpy - Copies a string.
00541   static wchar_t *wcscpy_emulation (wchar_t *destination,
00542                                     const wchar_t *source);
00543 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCPY */
00544 
00545 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSICMP)
00546   /// Emulated wcsicmp - Performs a case insensitive comparison of strings.
00547   static int wcsicmp_emulation (const wchar_t *string1,
00548                                 const wchar_t *string2);
00549 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSICMP */
00550 
00551 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN)
00552   /// Emulated wcslen - Returns the length of a string.
00553   static size_t wcslen_emulation (const ACE_WCHAR_T *string);
00554 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSLEN */
00555 
00556 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT)
00557   /// Emulated wcscat - Appends a string.
00558   static ACE_WCHAR_T *wcsncat_emulation (ACE_WCHAR_T *destination,
00559                                          const ACE_WCHAR_T *source,
00560                                          size_t count);
00561 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCAT */
00562 
00563 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCMP)
00564   /// Emulated wcsncmp - Compares two arrays.
00565   static int wcsncmp_emulation (const ACE_WCHAR_T *string1,
00566                                 const ACE_WCHAR_T *string2,
00567                                 size_t len);
00568 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCMP */
00569 
00570 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCPY)
00571   /// Emulated wcsncpy - Copies an array.
00572   static ACE_WCHAR_T *wcsncpy_emulation (ACE_WCHAR_T *destination,
00573                                          const ACE_WCHAR_T *source,
00574                                          size_t len);
00575 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCPY */
00576 
00577 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSNICMP)
00578   /// Emulated wcsnicmp - Performs a case insensitive comparison of two
00579   /// arrays
00580   static int wcsnicmp_emulation (const wchar_t *string1,
00581                                  const wchar_t *string2,
00582                                  size_t len);
00583 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSNICMP */
00584 
00585 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSPBRK)
00586   /// Emulated wcspbrk - Searches for characters in a string.
00587   static wchar_t *wcspbrk_emulation (const wchar_t *string,
00588                                      const wchar_t *charset);
00589 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSPBRK */
00590 
00591 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSRCHR)
00592   /// Emulated wcsrchr (wchar_t version) - Finds the last occurance of a
00593   /// character in a string.
00594   static wchar_t *wcsrchr_emulation (wchar_t *string, wint_t c);
00595 
00596   /// Emulated wcsrchr (const wchar_t version) - Finds the last occurance of a
00597   /// character in a string.
00598   static const wchar_t *wcsrchr_emulation (const wchar_t *string, wint_t c);
00599 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSRCHR */
00600 
00601 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCSPN)
00602   /// Emulated wcscspn.
00603   static size_t wcscspn_emulation (const wchar_t *string,
00604                                    const wchar_t *reject);
00605 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCSPN */
00606 
00607 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSPN)
00608   /// Emulated wcsspn.
00609   static size_t wcsspn_emulation (const wchar_t *string,
00610                                   const wchar_t *charset);
00611 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSPN */
00612 
00613 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSTR)
00614   /// Emulated wcsstr - Performs a case insensitive comparison of two strings.
00615   static wchar_t *wcsstr_emulation (const wchar_t *string,
00616                                     const wchar_t *charset);
00617 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSTR */
00618 
00619   //@}
00620 };
00621 
00622 # if defined (ACE_HAS_INLINED_OSCALLS)
00623 #   if defined (ACE_INLINE)
00624 #     undef ACE_INLINE
00625 #   endif /* ACE_INLINE */
00626 #   define ACE_INLINE inline
00627 #   include "ace/OS_String.inl"
00628 # endif /* ACE_HAS_INLINED_OSCALLS */
00629 
00630 #include "ace/post.h"
00631 #endif /* ACE_OS_STRING_H */

Generated on Mon Jun 16 11:20:45 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002