#include <ace/SString.h>
class ACE_WString {
public:friend ACE_Export ACE_WString operator+ ( const ACE_WString &, const ACE_WString & );static const int npos;ACE_WString (ACE_Allocator *alloc = 0);ACE_WString (const char *s, ACE_Allocator *alloc = 0);ACE_WString (const ACE_USHORT16 *s, ACE_Allocator *alloc = 0);ACE_WString ( const ACE_USHORT16 *s, size_t len, ACE_Allocator *alloc = 0 );ACE_WString (size_t len, ACE_Allocator *alloc = 0);ACE_WString (const ACE_WString &s);ACE_WString (ACE_USHORT16 c, ACE_Allocator *alloc = 0);~ACE_WString (void);ACE_USHORT16 operator[] (size_t index) const;ACE_USHORT16 &operator[] (size_t index);ACE_WString &operator= (const ACE_WString &);void set (const ACE_USHORT16 *s);void set (const ACE_USHORT16 *s, size_t len);ACE_WString substring (size_t offset, ssize_t length = -1) const;ACE_WString substr (size_t offset, ssize_t length = -1) const;ACE_WString &operator+= (const ACE_WString &);u_long hash (void) const;size_t length (void) const;ACE_USHORT16 *rep (void) const;char *char_rep (void) const;const ACE_USHORT16 *fast_rep (void) const;const ACE_USHORT16 *c_str (void) const;int strstr (const ACE_WString &s) const;int find (const ACE_WString &str, int pos = 0) const;int find (const ACE_USHORT16 *s, int pos = 0) const;int find (ACE_USHORT16 c, int pos = 0) const;int rfind (ACE_USHORT16 c, int pos = npos) const;int operator== (const ACE_WString &s) const;int operator!= (const ACE_WString &s) const;int compare (const ACE_WString &s) const;void dump (void) const;ACE_ALLOC_HOOK_DECLARE;static size_t wstrlen (const ACE_USHORT16 *);static const ACE_USHORT16 *strstr ( const ACE_USHORT16 *s1, const ACE_USHORT16 *s2 );void resize (size_t len);private:ACE_Allocator *allocator_;size_t len_;ACE_USHORT16 *rep_;};
friend ACE_Export ACE_WString operator+ (
const ACE_WString &,
const ACE_WString &
);
static const int npos;
ACE_WString (ACE_Allocator *alloc = 0);
ACE_WString (const char *s, ACE_Allocator *alloc = 0);
s into dynamically allocated memory.
ACE_WString (const ACE_USHORT16 *s, ACE_Allocator *alloc = 0);
s into dynamically allocated memory.
ACE_WString (
const ACE_USHORT16 *s,
size_t len,
ACE_Allocator *alloc = 0
);
len ACE_USHORT16's of s into dynamically
allocated memory (will NUL terminate the result).
ACE_WString (size_t len, ACE_Allocator *alloc = 0);
len + 1
ACE_USHORT16 characters. The newly created memory is set memset to 0.
ACE_WString (const ACE_WString &s);
ACE_WString (ACE_USHORT16 c, ACE_Allocator *alloc = 0);
c into dynamically allocated memory.
~ACE_WString (void);
ACE_USHORT16 operator[] (size_t index) const;
index'th character in the string (doesn't perform
bounds checking).
ACE_USHORT16 &operator[] (size_t index);
index'th character by reference in the string
(doesn't perform bounds checking).
ACE_WString &operator= (const ACE_WString &);
void set (const ACE_USHORT16 *s);
s
void set (const ACE_USHORT16 *s, size_t len);
len bytes of s (will NUL terminate the result)
ACE_WString substring (size_t offset, ssize_t length = -1) const;
ACE_WString substr (size_t offset, ssize_t length = -1) const;
ACE_WString &operator+= (const ACE_WString &);
u_long hash (void) const;
size_t length (void) const;
ACE_USHORT16 *rep (void) const;
char *char_rep (void) const;
const ACE_USHORT16 *fast_rep (void) const;
const ACE_USHORT16 *c_str (void) const;
int strstr (const ACE_WString &s) const;
int find (const ACE_WString &str, int pos = 0) const;
str starting at pos. Returns the index of the first
location that matches, else npos.
int find (const ACE_USHORT16 *s, int pos = 0) const;
s starting at pos. Returns the index of the first
location that matches, else npos.
int find (ACE_USHORT16 c, int pos = 0) const;
c starting at pos. Returns the index of the first
location that matches, else npos.
int rfind (ACE_USHORT16 c, int pos = npos) const;
c starting at pos (counting from the end). Returns the
index of the first location that matches, else npos.
int operator== (const ACE_WString &s) const;
int operator!= (const ACE_WString &s) const;
int compare (const ACE_WString &s) const;
strcmp-style comparison.
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
static size_t wstrlen (const ACE_USHORT16 *);
static const ACE_USHORT16 *strstr (
const ACE_USHORT16 *s1,
const ACE_USHORT16 *s2
);
void resize (size_t len);
len,
the string is resized to the new length. The data is is zero'd
out after this operation.
ACE_Allocator *allocator_;
size_t len_;
ACE_USHORT16 *rep_;