A common string class and character string support functions. More...
#include <ucommon/memory.h>
#include <ucommon/timers.h>
#include <ucommon/socket.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
class | ucc::charbuf< S > |
A template to create a character array that can be manipulated as a string. More... | |
class | ucc::memstring |
A string class that uses a cstring buffer that is fixed in memory. More... | |
class | ucc::string |
A copy-on-write string class that operates by reference count. More... | |
class | ucc::string::cstring |
This is an internal class which contains the actual string data along with some control fields. More... | |
class | ucc::stringbuf< S > |
A string class that has a predefined string buffer. More... | |
class | ucc::StringFormat |
A string conversion class for use as a base class in objects which can transform themselves into string representations. More... | |
Namespaces | |
namespace | ucc |
Common namespace for all ucommon objects. | |
Typedefs | |
typedef string | ucc::String |
A convenience type when mixing std::string in old compilers that are bad with namespaces... | |
typedef string | ucc::string_t |
A convenience type for string. | |
typedef unsigned short | ucc::strsize_t |
A convenience class for size of strings. | |
Functions | |
bool | ucc::eq (char const *s1, char const *s2) |
Compare two null terminated strings if equal. | |
bool | ucc::eq (char const *s1, char const *s2, size_t size) |
Compare two null terminated strings if equal up to specified size. | |
bool | ucc::eq (String &s1, String &s2) |
Compare two string objects if equal. | |
bool | ucc::ieq (char const *s1, char const *s2, size_t size) |
Compare two null terminated strings if equal for a specified size ignoring case. | |
bool | ucc::ieq (String &s1, String &s2) |
Compare two string objects if equal ignoring case. | |
bool | ucc::ieq (char const *s1, char const *s2) |
Compare two null terminated strings if equal ignoring case. | |
int | ucc::stricmp (const char *string1, const char *string2) |
Convenience function for case insensitive null terminated string compare. | |
int | ucc::strnicmp (const char *string1, const char *string2, size_t max) |
Convenience function for case insensitive null terminated string compare. |
A common string class and character string support functions.
Ucommon offers a simple string class that operates through copy-on-write when needing to expand buffer size. Derived classes and templates allows one to create strings which live entirely in the stack frame rather than using the heap. This offers the benefit of the string class manipulative members without compromising performance or locking issues in threaded applications. Other things found here include better and safer char array manipulation functions.
Definition in file string.h.