String.cpp File Reference

#include <support/String.h>
#include <support/Debug.h>
#include <support/SharedBuffer.h>
#include <support/Value.h>
#include <support/StdIO.h>
#include <support_p/WindowsCompatibility.h>
#include <ctype.h>
#include <stdlib.h>
#include <limits.h>

Defines

#define _SUPPORTS_UNIX_FILE_PATH   (TARGET_HOST!=TARGET_HOST_WIN32)
#define _SUPPORTS_WINDOWS_FILE_PATH   (TARGET_HOST==TARGET_HOST_WIN32)
#define GET_UTF8_BYTE(unicode, shift)   (char)((0x80 | (((unicode) >> (shift)) & 0x3f)))
#define GET_UTF8_LAST_BYTE(unicode)   (char)((0x80 | ((unicode) & 0x3f)))
#define SUPPORTS_SELFQC_DEBUG   1
#define UTF8_SHIFT_AND_MASK(unicode, byte)   (unicode)<<=6; (unicode) |= (0x3f & (byte));

Functions

void __initialize_string ()
void __terminate_string ()
bool _CharInSet (char ch, const char *set, int32_t setSize)
SValue BArrayAsValue (const SString *from, size_t count)
status_t BArrayConstruct (SString *to, const SValue &value, size_t count)
void BMoveAfter (SString *to, SString *from, size_t count)
void BMoveBefore (SString *to, SString *from, size_t count)
int Compare (const SString *a, const SString *b)
int Compare (const SString &a, const SString &b)
int ICompare (const SString *a, const SString *b)
int ICompare (const SString &a, const SString &b)
const sptr< ITextOutput > & operator<< (const sptr< ITextOutput > &io, const SString &string)
const char * path_delimiter ()
int path_delimiter_size ()
const char * path_dot_delimeter ()
const char * path_dot_dot_delimeter ()
bool path_equals_delimiter (char delimiter)
status_t path_normalize (SString &normalme)
int32_t path_normalize_root (SString &normalme)
int32_t path_root_length (const char *path)
int32_t path_root_size ()
bool path_valid_beginning (const char *path)
int32_t UTF8CharLen (uint8_t ch)
uint32_t UTF8CharToUint32 (const uint8_t *src, uint32_t length)
bool UTF8SafeIsAlpha (char ch)
char UTF8SafeToLower (char ch)
char UTF8SafeToUpper (char ch)
size_t WChar32ToUTF8 (uint8_t *dstP, wchar32_t srcChar)

Variables

const int32_t B_BUFFERING_ALLOC_SIZE = 32
const int32_t kAllocaBufferThreshold = 64
const int32_t kShortFindAfterTreshold = 100*1024


Define Documentation

#define _SUPPORTS_UNIX_FILE_PATH   (TARGET_HOST!=TARGET_HOST_WIN32)
 

#define _SUPPORTS_WINDOWS_FILE_PATH   (TARGET_HOST==TARGET_HOST_WIN32)
 

#define GET_UTF8_BYTE unicode,
shift   )     (char)((0x80 | (((unicode) >> (shift)) & 0x3f)))
 

#define GET_UTF8_LAST_BYTE unicode   )     (char)((0x80 | ((unicode) & 0x3f)))
 

#define SUPPORTS_SELFQC_DEBUG   1
 

#define UTF8_SHIFT_AND_MASK unicode,
byte   )     (unicode)<<=6; (unicode) |= (0x3f & (byte));
 


Function Documentation

void __initialize_string  ) 
 

void __terminate_string  ) 
 

bool _CharInSet char  ch,
const char *  set,
int32_t  setSize
[inline]
 

SValue BArrayAsValue const SString from,
size_t  count
 

status_t BArrayConstruct SString to,
const SValue value,
size_t  count
 

const char* path_delimiter  )  [inline]
 

int path_delimiter_size  )  [inline]
 

const char* path_dot_delimeter  )  [inline]
 

const char* path_dot_dot_delimeter  )  [inline]
 

bool path_equals_delimiter char  delimiter  )  [inline]
 

status_t path_normalize SString normalme  ) 
 

int32_t path_normalize_root SString normalme  ) 
 

int32_t path_root_length const char *  path  )  [inline]
 

int32_t path_root_size  )  [inline]
 

bool path_valid_beginning const char *  path  )  [inline]
 

int32_t UTF8CharLen uint8_t  ch  )  [inline]
 

uint32_t UTF8CharToUint32 const uint8_t *  src,
uint32_t  length
[inline]
 

bool UTF8SafeIsAlpha char  ch  )  [inline]
 

char UTF8SafeToLower char  ch  )  [inline]
 

char UTF8SafeToUpper char  ch  )  [inline]
 

size_t WChar32ToUTF8 uint8_t *  dstP,
wchar32_t  srcChar
 


Variable Documentation

const int32_t B_BUFFERING_ALLOC_SIZE = 32
 

const int32_t kAllocaBufferThreshold = 64
 

const int32_t kShortFindAfterTreshold = 100*1024