Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# OSCL Util

## Files
file | oscl_bin_stream.h
| Defines a set of binary stream classes which handle portable input / output of binary data regardless of the native byte order.

file | oscl_math.h
| Provides math functions.

file | oscl_media_data.h
| Defines a container class for media data made up of a collection of memory fragments.

file | oscl_media_status.h
| Defines a status values for the MediaData containers.

file | oscl_priqueue.h
| Implements a priority queue data structure similar to STL.

file | oscl_rand.h
| Provides pseudo-random number generation.

file | oscl_registry_access_client.h
| Client-side implementation Registry Access implementation.

file | oscl_registry_client.h
| Client-side implementation of OsclRegistry.

file | oscl_registry_client_impl.h
| Client-side implementation of OsclRegistryInterface.

file | oscl_registry_serv_impl.h
| Server-side implementation of OsclRegistry interfaces.

file | oscl_registry_types.h
| Common types used in Oscl registry interfaces.

file | oscl_snprintf.h
| Provides a portable implementation of snprintf.

file | oscl_str_ptr_len.h
| Defines a data structure for string containment/manipulations where the storage for the string is maintained externally.

file | oscl_string.h
| Provides a standardized set of string containers that can be used in place of character arrays.

file | oscl_string_containers.h
| Provides a standardized set of string containers that can be used in place of character arrays.

file | oscl_string_rep.h
| Contains some internal implementation for string containers.

file | oscl_string_uri.h
| Utilities to unescape URIs.

file | oscl_string_utf8.h
| Utilities to validate and truncate UTF-8 encoded strings.

file | oscl_string_utils.h
| Utilities to parse and convert strings.

file | oscl_string_xml.h
| Utilities to escape special characters in XML strings.

file | oscl_tickcount.h
| Defines a data structure for string containment/manipulations where the storage for the string is maintained externally.

file | oscl_utf8conv.h
| Utilities to convert unicode to utf8 and vice versa.

## Data Structures
class | BufferFragment
class | BufferMgr
class | BufferState
class | BufFragGroup
class | BufFragStatusClass
class | CFastRep
class | CHeapRep
class | CStackRep
class | MediaData
class | MediaStatusClass
class | MemAllocator
class | OSCL_FastString
class | OSCL_HeapString
class | OSCL_HeapStringA
class | OSCL_StackString
class | OSCL_String
class | OSCL_wFastString
class | OSCL_wHeapString
class | OSCL_wHeapStringA
class | OSCL_wStackString
class | OSCL_wString
class | OsclBinIStream
class | OsclBinIStreamBigEndian
class | OsclBinIStreamLittleEndian
class | OsclBinOStream
| Class OsclBinOStream implements the basic stream functions for an output stream. More...
class | OsclBinOStreamBigEndian
| Class OsclBinOStreamBigEndian implements a binary output stream using big endian byte ordering. More...
class | OsclBinOStreamLittleEndian
| Class OsclBinOStreamLittleEndian implements a binary output stream using little endian byte ordering. More...
class | OsclBinStream
class | OsclCompareLess
class | OsclComponentRegistry
class | OsclComponentRegistryData
class | OsclComponentRegistryElement
class | OsclPriorityQueue
class | OsclPriorityQueueBase
class | OsclRand
class | OsclRegistryAccessClient
class | OsclRegistryAccessClientImpl
class | OsclRegistryAccessClientTlsImpl
class | OsclRegistryAccessElement
class | OsclRegistryClient
class | OsclRegistryClientImpl
class | OsclRegistryClientTlsImpl
class | OsclRegistryServTlsImpl
class | OsclTickCount
struct | StrCSumPtrLen
| same as StrPtrLen, but includes checksum field and method to speed up querying More...
struct | StrPtrLen
| This data structure encapsulates a set of functions used to perform. More...
struct | WStrPtrLen
| This data structure encapsulates a set of functions used to perform. More...
## Defines
#define | oscl_isdigit(c) ((c) >= '0' && (c) <= '9')
#define | OSCLTICKCOUNT_MAX_TICKS 0xffffffff
#define | MAX_NUMBER_OF_BYTE_PER_UTF8 3
## Typedefs
typedef OsclAny * | OsclComponentFactory
typedef void(* | BufferFreeFuncPtr )(void *)
typedef uint32 | MediaTimestamp
typedef StrPtrLen | StrPtrLen
| This data structure encapsulates a set of functions used to perform.
typedef WStrPtrLen | WStrPtrLen
| This data structure encapsulates a set of functions used to perform.
typedef StrCSumPtrLen | StrCSumPtrLen
| same as StrPtrLen, but includes checksum field and method to speed up querying
typedef WStrPtrLen | OSCL_TStrPtrLen
## Enumerations
enum | TOSCL_StringOp { EOSCL_StringOp_CompressASCII, EOSCL_StringOp_UTF16ToUTF8 }
enum | TOSCL_wStringOp { EOSCL_wStringOp_ExpandASCII, EOSCL_wStringOp_UTF8ToUTF16 }
## Functions
OSCL_IMPORT_REF const char * | skip_whitespace (const char *ptr)
OSCL_IMPORT_REF char * | skip_whitespace (char *ptr)
OSCL_IMPORT_REF const char * | skip_whitespace (const char *start, const char *end)
OSCL_IMPORT_REF const char * | skip_to_whitespace (const char *start, const char *end)
OSCL_IMPORT_REF const char * | skip_to_line_term (const char *start_ptr, const char *end_ptr)
OSCL_IMPORT_REF const char * | skip_whitespace_and_line_term (const char *start, const char *end)
OSCL_IMPORT_REF int | extract_string (const char *in_ptr, char *outstring, int maxsize)
OSCL_IMPORT_REF int | extract_string (const char *start, const char *end, char *outstring, int maxsize)
OSCL_IMPORT_REF bool | PV_atoi (const char *buf, const char new_format, uint32 &value)
OSCL_IMPORT_REF bool | PV_atoi (const char *buf, const char new_format, int length, uint32 &value)
OSCL_IMPORT_REF bool | PV_atoi (const char *buf, const char new_format, int length, uint64 &value)
OSCL_IMPORT_REF bool | PV_atof (const char *buf, OsclFloat &value)
OSCL_IMPORT_REF bool | PV_atof (const char *buf, int length, OsclFloat &value)
OSCL_IMPORT_REF int | oscl_abs (int aVal)
OSCL_COND_IMPORT_REF double | oscl_log (double value)
OSCL_COND_IMPORT_REF double | oscl_log10 (double value)
OSCL_COND_IMPORT_REF double | oscl_sqrt (double value)
OSCL_COND_IMPORT_REF double | oscl_pow (double x, double y)
OSCL_COND_IMPORT_REF double | oscl_exp (double value)
OSCL_COND_IMPORT_REF double | oscl_sin (double value)
OSCL_COND_IMPORT_REF double | oscl_cos (double value)
OSCL_COND_IMPORT_REF double | oscl_tan (double value)
OSCL_COND_IMPORT_REF double | oscl_asin (double value)
OSCL_COND_IMPORT_REF double | oscl_atan (double value)
OSCL_COND_IMPORT_REF double | oscl_floor (double value)
OSCL_IMPORT_REF int32 | oscl_snprintf (char *str, uint32 count, const char *fmt,...)
OSCL_IMPORT_REF int32 | oscl_snprintf (oscl_wchar *str, uint32 count, const oscl_wchar *fmt,...)
OSCL_IMPORT_REF int32 | oscl_vsnprintf (char *str, uint32 count, const char *fmt, va_list args)
OSCL_IMPORT_REF int32 | oscl_vsnprintf (oscl_wchar *str, uint32 count, const oscl_wchar *fmt, va_list args)
OSCL_IMPORT_REF bool | oscl_str_unescape_uri (const char *str_buf_in, char *str_buf_out, uint32 max_out_buf_bytes, uint32 max_bytes, uint32 &out_buf_len)
| unescape any of the special escape sequence in the uri string
OSCL_IMPORT_REF bool | oscl_str_unescape_uri (const OSCL_String &oscl_str_in, OSCL_String &oscl_str_out, uint32 &out_buf_len)
| unescape any of the special escape sequence in the uri string
OSCL_IMPORT_REF bool | oscl_str_is_valid_utf8 (const uint8 *str_buf, uint32 &num_valid_characters, uint32 max_bytes=0, uint32 max_char_2_valid=0, uint32 *num_byte_4_char=NULL)
| Check if the input string contains any illegal UTF-8 character. The function scans the string and validate that each character is a valid utf-8. It stops at the first NULL character, invalid character or the max_byte value. The string is valid if and only if every character is a valid utf-8 character and the scanning stopped on a character boundary.
OSCL_IMPORT_REF int32 | oscl_str_truncate_utf8 (uint8 *str_buf, uint32 max_char, uint32 max_bytes=0)
| Truncates the UTF-8 string upto the required size.
OSCL_IMPORT_REF bool | oscl_str_need_escape_xml (const char *str_buf, uint32 &num_escape_bytes, uint32 max_bytes=0)
| Check if the input string contains any special ASCII character like &, <, >, ', ". The function scans the string and check if each character is a special character. It stops at the first NULL character (if max_bytes = 0), or the max_byte value.
OSCL_IMPORT_REF int32 | oscl_str_escape_xml (const char *str_buf_in, char *str_buf_out, uint32 max_out_buf_bytes, uint32 max_bytes=0, uint32 *num_bytes_written=NULL)
| Escape any of the following special characters in the string Special ASCII characters: &, <, >, ', ".
OSCL_IMPORT_REF int32 | oscl_UTF8ToUnicode (const char *input, int32 inLength, oscl_wchar *output, int32 outLength)
| Convert UTF8 byte sequence to Unicode string.
OSCL_IMPORT_REF int32 | oscl_UnicodeToUTF8 (const oscl_wchar *input, int32 inLength, char *output, int32 outLength)
| Convert Unicode string to UTF8 byte sequence.
BufferFragment * | GetFragment (const int32 idx)
BufferState * | GetBufferState (const int32 idx)
uint32 | get_size () const
uint32 | get_size () const
uint32 | get_maxsize () const
uint32 | get_maxsize () const
const chartype * | get_cstr () const
const chartype * | get_cstr () const
chartype * | get_str () const
chartype * | get_str () const
| OSCL_HeapString ()
| OSCL_wHeapString ()
| OSCL_HeapString (const chartype *cstr)
| OSCL_wHeapString (const chartype *cstr)
void | set (const chartype *buf, uint32 length)
void | set (const chartype *buf, uint32 length)
void | set (const other_chartype *buf, optype op)
void | set (const other_chartype *buf, optype op)
void | set (const other_chartype *buf, uint32 length, optype op)
void | set (const other_chartype *buf, uint32 length, optype op)
| OSCL_HeapString (const chartype *buf, uint32 length)
| OSCL_wHeapString (const chartype *buf, uint32 length)
| OSCL_HeapString (const OSCL_HeapString &src)
| OSCL_wHeapString (const OSCL_wHeapString &src)
| OSCL_HeapString (const OSCL_String &src)
| OSCL_wHeapString (const OSCL_wString &src)
| ~OSCL_HeapString ()
| ~OSCL_wHeapString ()
OSCL_HeapString & | operator= (const OSCL_HeapString &src)
OSCL_wHeapString & | operator= (const OSCL_wHeapString &src)
OSCL_HeapString & | operator= (const OSCL_String &src)
OSCL_wHeapString & | operator= (const OSCL_wString &src)
OSCL_HeapString & | operator= (const chartype *cstr)
OSCL_wHeapString & | operator= (const chartype *cstr)
uint32 | get_size () const
uint32 | get_size () const
uint32 | get_maxsize () const
uint32 | get_maxsize () const
const chartype * | get_cstr () const
const chartype * | get_cstr () const
chartype * | get_str () const
chartype * | get_str () const
| OSCL_StackString ()
| OSCL_wStackString ()
| OSCL_StackString (const chartype *cstr)
| OSCL_wStackString (const chartype *cstr)
void | set (const chartype *buf, uint32 length)
void | set (const chartype *buf, uint32 length)
void | set (const other_chartype *buf, optype op)
void | set (const other_chartype *buf, optype op)
void | set (const other_chartype *buf, uint32 length, optype op)
void | set (const other_chartype *buf, uint32 length, optype op)
| OSCL_StackString (const chartype *buf, uint32 length)
| OSCL_wStackString (const chartype *buf, uint32 length)
| OSCL_StackString (const OSCL_StackString &src)
| OSCL_wStackString (const OSCL_wStackString &src)
| OSCL_StackString (const OSCL_String &src)
| OSCL_wStackString (const OSCL_wString &src)
| ~OSCL_StackString ()
| ~OSCL_wStackString ()
OSCL_StackString & | operator= (const OSCL_StackString &src)
OSCL_wStackString & | operator= (const OSCL_wStackString &src)
OSCL_StackString & | operator= (const OSCL_String &src)
OSCL_wStackString & | operator= (const OSCL_wString &src)
OSCL_StackString & | operator= (const chartype *cstr)
OSCL_wStackString & | operator= (const chartype *cstr)
## Variables
const int32 | APPEND_MEDIA_AT_END = -1
const uint8 | OSCL_ASCII_CASE_MAGIC_BIT = 0x20

## Define Documentation

#define MAX_NUMBER_OF_BYTE_PER_UTF8 3

| Define the maximum UTF8 representation in bytes. Todo: Handle 4-byte surrogate pair representation

#define oscl_isdigit | ( | c |  | ) | ((c) >= '0' && (c) <= '9')

#define OSCLTICKCOUNT_MAX_TICKS 0xffffffff

## Typedef Documentation

typedef void(* BufferFreeFuncPtr)(void *)

typedef uint32 MediaTimestamp

typedef WStrPtrLen OSCL_TStrPtrLen

typedef OsclAny* OsclComponentFactory

| OsclComponentFactory is an opaque pointer.

typedef StrCSumPtrLen StrCSumPtrLen

| same as StrPtrLen, but includes checksum field and method to speed up querying

typedef struct StrPtrLen StrPtrLen

| This data structure encapsulates a set of functions used to perform. standard string operations. It should be used for null-terminated constant (non-modifiable) strings of char type.

typedef struct WStrPtrLen WStrPtrLen

| This data structure encapsulates a set of functions used to perform. standard string operations. It should be used for null-terminated constant strings (non-modifiable) of wchar type.

## Enumeration Type Documentation

enum TOSCL_StringOp

  | Conversion operations for OSCL_String classes Enumeration values:
  EOSCL_StringOp_CompressASCII |
  EOSCL_StringOp_UTF16ToUTF8 |

enum TOSCL_wStringOp

  | Conversion operations for OSCL_wString classes Enumeration values:
  EOSCL_wStringOp_ExpandASCII |
  EOSCL_wStringOp_UTF8ToUTF16 |

## Function Documentation

OSCL_IMPORT_REF int extract_string | ( | const char * | start,
|  | const char * | end,
|  | char * | outstring,
|  | int | maxsize
| ) |

OSCL_IMPORT_REF int extract_string | ( | const char * | in_ptr,
|  | char * | outstring,
|  | int | maxsize
| ) |

template<uint32 MaxBufSize>
const OSCL_wStackString< MaxBufSize >::chartype * OSCL_wStackString< MaxBufSize >::get_cstr | ( |  | ) | `[virtual, inherited]`

| Implements OSCL_wString.

template<uint32 MaxBufSize>
const OSCL_StackString< MaxBufSize >::chartype * OSCL_StackString< MaxBufSize >::get_cstr | ( |  | ) | `[virtual, inherited]`

| This function returns the C-style string for read access. Implements OSCL_String.

template<class Alloc>
const OSCL_wHeapString< Alloc >::chartype * OSCL_wHeapString< Alloc >::get_cstr | ( |  | ) | `[virtual, inherited]`

| Implements OSCL_wString.

template<class Alloc>
const OSCL_HeapString< Alloc >::chartype * OSCL_HeapString< Alloc >::get_cstr | ( |  | ) | `[virtual, inherited]`

| This function returns the C-style string for read access. Implements OSCL_String.

template<uint32 MaxBufSize>
uint32 OSCL_wStackString< MaxBufSize >::get_maxsize | ( |  | ) | `[virtual, inherited]`

| Implements OSCL_wString.

template<uint32 MaxBufSize>
uint32 OSCL_StackString< MaxBufSize >::get_maxsize | ( |  | ) | `[virtual, inherited]`

| This function returns the maximum available storage size, not including null terminator. The maximum size may be larger than the current string size. Implements OSCL_String.

template<class Alloc>
uint32 OSCL_wHeapString< Alloc >::get_maxsize | ( |  | ) | `[virtual, inherited]`

| Implements OSCL_wString.

template<class Alloc>
uint32 OSCL_HeapString< Alloc >::get_maxsize | ( |  | ) | `[virtual, inherited]`

| This function returns the maximum available storage size, not including null terminator. The maximum size may be larger than the current string size. Implements OSCL_String.

template<uint32 MaxBufSize>
uint32 OSCL_wStackString< MaxBufSize >::get_size | ( |  | ) | `[virtual, inherited]`

| Implements OSCL_wString.

template<uint32 MaxBufSize>
uint32 OSCL_StackString< MaxBufSize >::get_size | ( |  | ) | `[virtual, inherited]`

| Pure virtuals from OSCL_String Implements OSCL_String.

template<class Alloc>
uint32 OSCL_wHeapString< Alloc >::get_size | ( |  | ) | `[virtual, inherited]`

| Implements OSCL_wString.

template<class Alloc>
uint32 OSCL_HeapString< Alloc >::get_size | ( |  | ) | `[virtual, inherited]`

| Pure virtuals from OSCL_String Implements OSCL_String.

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize >::chartype * OSCL_wStackString< MaxBufSize >::get_str | ( |  | ) | `[virtual, inherited]`

| Implements OSCL_wString.

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize >::chartype * OSCL_StackString< MaxBufSize >::get_str | ( |  | ) | `[virtual, inherited]`

| This function returns the C-style string for write access. If the string is not writable it returns NULL. Implements OSCL_String.

template<class Alloc>
OSCL_wHeapString< Alloc >::chartype * OSCL_wHeapString< Alloc >::get_str | ( |  | ) | `[virtual, inherited]`

| Implements OSCL_wString.

template<class Alloc>
OSCL_HeapString< Alloc >::chartype * OSCL_HeapString< Alloc >::get_str | ( |  | ) | `[virtual, inherited]`

| This function returns the C-style string for write access. If the string is not writable it returns NULL. Implements OSCL_String.

template<class ChainClass, uint32 max_frags>
BufferState * BufFragGroup< ChainClass, max_frags >::GetBufferState | ( | const int32 | idx | ) | `[inline, inherited]`

template<class ChainClass, uint32 max_frags>
BufferFragment * BufFragGroup< ChainClass, max_frags >::GetFragment | ( | const int32 | idx | ) | `[inline, inherited]`

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize > & OSCL_wStackString< MaxBufSize >::operator= | ( | const chartype * | cstr | ) | `[inherited]`

| Reimplemented from OSCL_wString.

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize > & OSCL_StackString< MaxBufSize >::operator= | ( | const chartype * | cstr | ) | `[inherited]`

| Assignment operator am: null-terminated string Reimplemented from OSCL_String.

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize > & OSCL_wStackString< MaxBufSize >::operator= | ( | const OSCL_wString & | src | ) | `[inherited]`

| Reimplemented from OSCL_wString.

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize > & OSCL_StackString< MaxBufSize >::operator= | ( | const OSCL_String & | src | ) | `[inherited]`

| Assignment operator Reimplemented from OSCL_String.

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize > & OSCL_wStackString< MaxBufSize >::operator= | ( | const OSCL_wStackString< MaxBufSize > & | src | ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize > & OSCL_StackString< MaxBufSize >::operator= | ( | const OSCL_StackString< MaxBufSize > & | src | ) | `[inherited]`

| Assignment operators

template<class Alloc>
OSCL_wHeapString< Alloc > & OSCL_wHeapString< Alloc >::operator= | ( | const chartype * | cstr | ) | `[inherited]`

| Reimplemented from OSCL_wString.

template<class Alloc>
OSCL_HeapString< Alloc > & OSCL_HeapString< Alloc >::operator= | ( | const chartype * | cstr | ) | `[inherited]`

| Assignment operator am: null-terminated string Reimplemented from OSCL_String.

template<class Alloc>
OSCL_wHeapString< Alloc > & OSCL_wHeapString< Alloc >::operator= | ( | const OSCL_wString & | src | ) | `[inherited]`

| Reimplemented from OSCL_wString.

template<class Alloc>
OSCL_HeapString< Alloc > & OSCL_HeapString< Alloc >::operator= | ( | const OSCL_String & | src | ) | `[inherited]`

| Assignment operator Reimplemented from OSCL_String.

template<class Alloc>
OSCL_wHeapString< Alloc > & OSCL_wHeapString< Alloc >::operator= | ( | const OSCL_wHeapString< Alloc > & | src | ) | `[inherited]`

template<class Alloc>
OSCL_HeapString< Alloc > & OSCL_HeapString< Alloc >::operator= | ( | const OSCL_HeapString< Alloc > & | src | ) | `[inherited]`

| Assignment operators

OSCL_IMPORT_REF int oscl_abs | ( | int | aVal | ) |

OSCL_COND_IMPORT_REF double oscl_asin | ( | double | value | ) |

  | Calculates the arc since of a number Parameters:
  value | source value

OSCL_COND_IMPORT_REF double oscl_atan | ( | double | value | ) |

  | Calculates the arc tangent of a number Parameters:
  value | source value

OSCL_COND_IMPORT_REF double oscl_cos | ( | double | value | ) |

  | Calculates the cosine of a number Parameters:
  value | source value

OSCL_COND_IMPORT_REF double oscl_exp | ( | double | value | ) |

  | Calculates the exponential of e for a number Parameters:
  value | source value

OSCL_COND_IMPORT_REF double oscl_floor | ( | double | value | ) |

  | Calculates the floor of a number Parameters:
  value | source value

template<class Alloc>
OSCL_HeapString< Alloc >::OSCL_HeapString | ( | const OSCL_String & | src | ) | `[inherited]`

template<class Alloc>
OSCL_HeapString< Alloc >::OSCL_HeapString | ( | const OSCL_HeapString< Alloc > & | src | ) | `[inherited]`

  | Creates a heap string that contains a copy of the input string. Parameters:
  src: | input string.

template<class Alloc>
OSCL_HeapString< Alloc >::OSCL_HeapString | ( | const chartype * | buf,
|  | uint32 | length
| ) | `[inherited]`

  | Creates a heap string that contains a copy of the input string or character array. Parameters:
  src: | character array, not necessarily null-terminated.
  length: | number of characters to copy.

template<class Alloc>
OSCL_HeapString< Alloc >::OSCL_HeapString | ( | const chartype * | cstr | ) | `[inherited]`

  | Creates a heap string that contains a copy of the input string. Parameters:
  cp: | null-terminated string.

template<class Alloc>
OSCL_HeapString< Alloc >::OSCL_HeapString | ( |  | ) | `[inherited]`

| The default constructor creates an empty string.

OSCL_COND_IMPORT_REF double oscl_log | ( | double | value | ) |

  | Calculates the natural log of a number Parameters:
  value | source value

OSCL_COND_IMPORT_REF double oscl_log10 | ( | double | value | ) |

  | Calculates tthe logarithm to base 10 of a number Parameters:
  value | source value

OSCL_COND_IMPORT_REF double oscl_pow | ( | double | x,
|  | double | y
| ) |

  | Calculates the value of x to the power of y Parameters:
  x | base value
  y | power

OSCL_COND_IMPORT_REF double oscl_sin | ( | double | value | ) |

  | Calculates the sine of a number Parameters:
  value | source value

OSCL_IMPORT_REF int32 oscl_snprintf | ( | oscl_wchar * | str,
|  | uint32 | count,
|  | const oscl_wchar * | fmt,
|  | ... |
| ) |

OSCL_IMPORT_REF int32 oscl_snprintf | ( | char * | str,
|  | uint32 | count,
|  | const char * | fmt,
|  | ... |
| ) |

OSCL_COND_IMPORT_REF double oscl_sqrt | ( | double | value | ) |

  | Calculates the square root of a number Parameters:
  value | source value

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize >::OSCL_StackString | ( | const OSCL_String & | src | ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize >::OSCL_StackString | ( | const OSCL_StackString< MaxBufSize > & | src | ) | `[inherited]`

  | Creates an OSCL_StackString with a copy of the input string. The string may be truncated to fit the available storage. Parameters:
  src: | input string.

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize >::OSCL_StackString | ( | const chartype * | buf,
|  | uint32 | length
| ) | `[inherited]`

  | Creates an OSCL_StackString with a copy of the input string. The string may be truncated to fit the available storage. Parameters:
  src: | a character array, not necessarily null-terminated.
  length: | the number of characters to copy.

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize >::OSCL_StackString | ( | const chartype * | cstr | ) | `[inherited]`

  | Creates an OSCL_StackString with a copy of the input string. The string may be truncated to fit the available storage. Parameters:
  cp: | a null-terminated string.

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize >::OSCL_StackString | ( |  | ) | `[inherited]`

| Creates an OSCL_StackString initialized with an empty string.

OSCL_IMPORT_REF int32 oscl_str_escape_xml | ( | const char * | str_buf_in,
|  | char * | str_buf_out,
|  | uint32 | max_out_buf_bytes,
|  | uint32 | max_bytes = 0,
|  | uint32 * | num_bytes_written = NULL
| ) |

  | Escape any of the following special characters in the string Special ASCII characters: &, <, >, ', ". The function scans the string and replaces each special character with its corresponding escape sequence. It stops at the first NULL character, the max_byte value. Parameters:
  str_buf_in | Ptr to an input string
  str_buf_out | Ptr to an output buffer which stores the modified string
  max_out_buf_bytes | The size of str_buf_out.
  max_bytes | The maximum number of bytes to read (a zero value means read to the first NULL character). It is the length of str_buf_in.
  num_bytes_written | Number of bytes written in the output buffer, str_buf_out
Returns: It returns the number of bytes in the str_buf_outring if succeeded. It returns negative number if failed, and its absolute value indicates the total number bytes written to the output buffer, str_buf_out, if str_buf_out != null.

OSCL_IMPORT_REF bool oscl_str_is_valid_utf8 | ( | const uint8 * | str_buf,
|  | uint32 & | num_valid_characters,
|  | uint32 | max_bytes = 0,
|  | uint32 | max_char_2_valid = 0,
|  | uint32 * | num_byte_4_char = NULL
| ) |

  | Check if the input string contains any illegal UTF-8 character. The function scans the string and validate that each character is a valid utf-8. It stops at the first NULL character, invalid character or the max_byte value. The string is valid if and only if every character is a valid utf-8 character and the scanning stopped on a character boundary. Parameters:
  str_buf | Ptr to an input string, which may not terminate with null, to be checked
  num_valid_chars | This is an output parameter which is the number of valid utf-8 characters actually read.
  max_bytes | The maximum number of bytes to read (a zero value means read to the first NULL character).
  max_char_2_valid | This is an input parameter. Specify the number of utf-8 characters the caller wants to validate.
  num_byte_4_char | This is an output parameter. The number of bytes used by the max_char characters
Returns: True if the string is valid and false otherwise.

OSCL_IMPORT_REF bool oscl_str_need_escape_xml | ( | const char * | str_buf,
|  | uint32 & | num_escape_bytes,
|  | uint32 | max_bytes = 0
| ) |

  | Check if the input string contains any special ASCII character like &, <, >, ', ". The function scans the string and check if each character is a special character. It stops at the first NULL character (if max_bytes = 0), or the max_byte value. Parameters:
  str_buf | Ptr to an input string, which may not terminate with null, to be checked
  num_escape_bytes | This is an output parameter which is the number of bytes needed to hold the result string. Value 0 indicates that there is no special character found. If max_bytes = 0, the return value does not include the null character.
  max_bytes | The maximum number of bytes to read (a zero value means read to the first NULL character).
Returns: True if the function succeeds, and num_escape_bytes = 0 means that no special character is found, num_escape_bytes >0 means the number of bytes of the result string. False if there is any error occurred.

OSCL_IMPORT_REF int32 oscl_str_truncate_utf8 | ( | uint8 * | str_buf,
|  | uint32 | max_char,
|  | uint32 | max_bytes = 0
| ) |

  | Truncates the UTF-8 string upto the required size. The function will modify the str_buf so that it contains AT MOST len valid utf-8 characters. If a NULL character is found before reading len utf-8 characters, then the function does not modify the string and simply returns the number of characters. If an invalid character is found, then it will insert a NULL character after the last valid character and return the length. Otherwise, it will insert a NULL character after len valid utf-8 characters and return the length. Parameters:
  str_buf | Ptr to an input string which may not terminate with null
  max_char | The max number of the UTF-8 CHARACTERS
  max_bytes | The maximum number of bytes to read (a zero value means read to the first NULL character).
Returns: It returns the length of the truncated string in utf-8 characters.

OSCL_IMPORT_REF bool oscl_str_unescape_uri | ( | const OSCL_String & | oscl_str_in,
|  | OSCL_String & | oscl_str_out,
|  | uint32 & | out_buf_len
| ) |

  | unescape any of the special escape sequence in the uri string The function scans the string and replaces each escape sequence with its corresponding character. It stops at the first null character, or the max_byte value. It returns false if the string contains any illegal escape sequence or the output buffer is not big enough. The out_buf_len value indicates the needed buffer length or the index of the byte that causes the error respectively. Parameters:
  oscl_str_in | Ptr to an input OSCL_String
  oscl_str_out | Ptr to an output OSCL_String which stores the modified string
  out_buf_len | The length of the result string (not including the null character)
Returns: It returns true if succeeds, otherwise false.

OSCL_IMPORT_REF bool oscl_str_unescape_uri | ( | const char * | str_buf_in,
|  | char * | str_buf_out,
|  | uint32 | max_out_buf_bytes,
|  | uint32 | max_bytes,
|  | uint32 & | out_buf_len
| ) |

  | unescape any of the special escape sequence in the uri string The function scans the string and replaces each escape sequence with its corresponding character. It stops at the first null character, or the max_byte value. It returns false if the string contains any illegal escape sequence or the output buffer is not big enough. The out_buf_len value indicates the needed buffer length or the index of the byte that causes the error respectively. Parameters:
  str_buf_in | Ptr to an input string
  str_buf_out | Ptr to an output buffer which stores the modified string
  max_out_buf_bytes | The size of str_buf_out.
  max_bytes | The maximum number of bytes to read. It is the length of str_buf_in.
  out_buf_len | The length of the result string (not including the null character)
Returns: It returns true if succeeds, otherwise false.

OSCL_COND_IMPORT_REF double oscl_tan | ( | double | value | ) |

  | Calculates the tangential of a number Parameters:
  value | source value

OSCL_IMPORT_REF int32 oscl_UnicodeToUTF8 | ( | const oscl_wchar * | input,
|  | int32 | inLength,
|  | char * | output,
|  | int32 | outLength
| ) |

  | Convert Unicode string to UTF8 byte sequence. The function converts Unicode string to UTF8 byte sequence. The length of input Unicode string is specified. It stops at two conditions: (A) Whole input Unicode string is successfully converted. (B) Destination buferr is not enough for output. In case of (A), it adds a terminated '\0' at the end of the output UTF8 byte sequence. and returns length of the output UTF8 byte sequence(without counting terminated '\0'). In case of (B), it converts as much as possible to the output buffer and adds a terminated '\0' at the end of the output UTF8 byte sequence"(no '\0' added if outLength is less than or equal to 0, return 0)", and returns 0. Parameters:
  input | Ptr to an input Unicode string. '\0' termanation is not neccesary.
  inLength | The length of the input Unicode string, without counting terminated '\0'(if any).
  output | Ptr to an output buffer which output UTF8 byte sequence is written in.
  outLength | The size of output buffer, also the maximum number of char could be written in.
Returns: length of output (excludes '\0') : completely converts all input string and appends '\0' to output; 0 : insufficient buffer or error in conversion

OSCL_IMPORT_REF int32 oscl_UTF8ToUnicode | ( | const char * | input,
|  | int32 | inLength,
|  | oscl_wchar * | output,
|  | int32 | outLength
| ) |

  | Convert UTF8 byte sequence to Unicode string. The function converts UTF8 byte sequence (or ASCII sequence) to Unicode string. The length of input UTF8 byte sequence is specified. It stops at two conditions: (A) Whole input UTF8 byte sequence is successfully converted. (B) Output buferr is not enough for output, or parse error. In case of (A), it adds a terminated '\0' at the end of the output Unicode string, and returns length of the output Unicode string(without counting terminated '\0'). In case of (B), it converts as much as possible to the output buffer and adds a terminated '\0' at the end of the output Unicode string"(no '\0' added if outLength is less than or equal to 0, return 0)", and returns 0. Parameters:
  input | Ptr to an input UTF8 byte sequence. '\0' termanation is not neccesary.
  inLength | The length of the input UTF8 byte sequence, without counting terminated '\0'(if any).
  output | Ptr to an output buffer which output Unicode string is written in.
  outLength | The size of output buffer, also the maximum number of oscl_wchar could be written in.
Returns: Length of output (excludes '\0') : completely converts all input string and appends '\0' to output; 0 : insufficient buffer or error in conversion

OSCL_IMPORT_REF int32 oscl_vsnprintf | ( | oscl_wchar * | str,
|  | uint32 | count,
|  | const oscl_wchar * | fmt,
|  | va_list | args
| ) |

OSCL_IMPORT_REF int32 oscl_vsnprintf | ( | char * | str,
|  | uint32 | count,
|  | const char * | fmt,
|  | va_list | args
| ) |

template<class Alloc>
OSCL_wHeapString< Alloc >::OSCL_wHeapString | ( | const OSCL_wString & | src | ) | `[inherited]`

template<class Alloc>
OSCL_wHeapString< Alloc >::OSCL_wHeapString | ( | const OSCL_wHeapString< Alloc > & | src | ) | `[inherited]`

template<class Alloc>
OSCL_wHeapString< Alloc >::OSCL_wHeapString | ( | const chartype * | buf,
|  | uint32 | length
| ) | `[inherited]`

template<class Alloc>
OSCL_wHeapString< Alloc >::OSCL_wHeapString | ( | const chartype * | cstr | ) | `[inherited]`

template<class Alloc>
OSCL_wHeapString< Alloc >::OSCL_wHeapString | ( |  | ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize >::OSCL_wStackString | ( | const OSCL_wString & | src | ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize >::OSCL_wStackString | ( | const OSCL_wStackString< MaxBufSize > & | src | ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize >::OSCL_wStackString | ( | const chartype * | buf,
|  | uint32 | length
| ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize >::OSCL_wStackString | ( | const chartype * | cstr | ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize >::OSCL_wStackString | ( |  | ) | `[inherited]`

OSCL_IMPORT_REF bool PV_atof | ( | const char * | buf,
|  | int | length,
|  | OsclFloat & | value
| ) |

OSCL_IMPORT_REF bool PV_atof | ( | const char * | buf,
|  | OsclFloat & | value
| ) |

OSCL_IMPORT_REF bool PV_atoi | ( | const char * | buf,
|  | const char | new_format,
|  | int | length,
|  | uint64 & | value
| ) |

OSCL_IMPORT_REF bool PV_atoi | ( | const char * | buf,
|  | const char | new_format,
|  | int | length,
|  | uint32 & | value
| ) |

OSCL_IMPORT_REF bool PV_atoi | ( | const char * | buf,
|  | const char | new_format,
|  | uint32 & | value
| ) |

template<uint32 MaxBufSize>
void OSCL_wStackString< MaxBufSize >::set | ( | const other_chartype * | buf,
|  | uint32 | length,
|  | optype | op
| ) | `[inherited]`

template<uint32 MaxBufSize>
void OSCL_StackString< MaxBufSize >::set | ( | const other_chartype * | buf,
|  | uint32 | length,
|  | optype | op
| ) | `[inherited]`

  | Set the contents of this string to a new string or character array, with conversion operation. Parameters:
  buf: | string or character array.
  length: | number of characters to copy.
  op: | conversion operation to apply

template<uint32 MaxBufSize>
void OSCL_wStackString< MaxBufSize >::set | ( | const other_chartype * | buf,
|  | optype | op
| ) | `[inherited]`

template<uint32 MaxBufSize>
void OSCL_StackString< MaxBufSize >::set | ( | const other_chartype * | buf,
|  | optype | op
| ) | `[inherited]`

  | Set the contents of this string to a new string, with conversion operation. Parameters:
  buf: | NULL-terminated wide string.
  op: | conversion operation to apply

template<uint32 MaxBufSize>
void OSCL_wStackString< MaxBufSize >::set | ( | const chartype * | buf,
|  | uint32 | length
| ) | `[inherited]`

template<uint32 MaxBufSize>
void OSCL_StackString< MaxBufSize >::set | ( | const chartype * | buf,
|  | uint32 | length
| ) | `[inherited]`

  | Set the contents of this string to a new string or character array. Parameters:
  buf: | string or character array.
  length: | number of characters to copy.

template<class Alloc>
void OSCL_wHeapString< Alloc >::set | ( | const other_chartype * | buf,
|  | uint32 | length,
|  | optype | op
| ) | `[inherited]`

template<class Alloc>
void OSCL_HeapString< Alloc >::set | ( | const other_chartype * | buf,
|  | uint32 | length,
|  | optype | op
| ) | `[inherited]`

  | Set the contents of this string to a new string or character array, with conversion operation. Parameters:
  buf: | string or character array.
  length: | number of characters to copy.
  op: | conversion operation to apply

template<class Alloc>
void OSCL_wHeapString< Alloc >::set | ( | const other_chartype * | buf,
|  | optype | op
| ) | `[inherited]`

template<class Alloc>
void OSCL_HeapString< Alloc >::set | ( | const other_chartype * | buf,
|  | optype | op
| ) | `[inherited]`

  | Set the contents of this string to a new string, with conversion operation. Parameters:
  buf: | NULL-terminated wide string.
  op: | conversion operation to apply

template<class Alloc>
void OSCL_wHeapString< Alloc >::set | ( | const chartype * | buf,
|  | uint32 | length
| ) | `[inherited]`

template<class Alloc>
void OSCL_HeapString< Alloc >::set | ( | const chartype * | buf,
|  | uint32 | length
| ) | `[inherited]`

  | Set the contents of this string to a new string or character array. Parameters:
  buf: | string or character array.
  length: | number of characters to copy.

OSCL_IMPORT_REF const char* skip_to_line_term | ( | const char * | start_ptr,
|  | const char * | end_ptr
| ) |

OSCL_IMPORT_REF const char* skip_to_whitespace | ( | const char * | start,
|  | const char * | end
| ) |

OSCL_IMPORT_REF const char* skip_whitespace | ( | const char * | start,
|  | const char * | end
| ) |

OSCL_IMPORT_REF char* skip_whitespace | ( | char * | ptr | ) |

OSCL_IMPORT_REF const char* skip_whitespace | ( | const char * | ptr | ) |

OSCL_IMPORT_REF const char* skip_whitespace_and_line_term | ( | const char * | start,
|  | const char * | end
| ) |

template<class Alloc>
OSCL_HeapString< Alloc >::~OSCL_HeapString | ( |  | ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_StackString< MaxBufSize >::~OSCL_StackString | ( |  | ) | `[inherited]`

template<class Alloc>
OSCL_wHeapString< Alloc >::~OSCL_wHeapString | ( |  | ) | `[inherited]`

template<uint32 MaxBufSize>
OSCL_wStackString< MaxBufSize >::~OSCL_wStackString | ( |  | ) | `[inherited]`

## Variable Documentation

const int32 APPEND_MEDIA_AT_END = -1

const uint8 OSCL_ASCII_CASE_MAGIC_BIT = 0x20