class LString16 : public RBuf16 |
Public Member Functions | |
---|---|
LString16() | |
LString16(TInt) | |
LString16(const TDesC16 &) | |
LString16(const TUint16 *) | |
LString16(const LString16 &) | |
LString16(HBufC16 *) | |
LString16(TUint16 *, TInt) | |
LString16(TUint16 *, TInt, TInt) | |
LString16(const wchar_t *) | |
~LString16() | |
IMPORT_C void | AppendFillL(TChar, TInt) |
IMPORT_C void | AppendFormatL(TRefByValue< const TDesC16 >, ...) |
IMPORT_C void | AppendFormatListL(const TDesC16 &, VA_LIST) |
IMPORT_C void | AppendJustifyL(const TDesC16 &, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustifyL(const TDesC16 &, TInt, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustifyL(const TUint16 *, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustifyL(const TUint16 *, TInt, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustifyL(const wchar_t *, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustifyL(const wchar_t *, TInt, TInt, TAlign, TChar) |
IMPORT_C void | AppendL(TChar) |
IMPORT_C void | AppendL(const TDesC16 &) |
IMPORT_C void | AppendL(const TUint16 *, TInt) |
IMPORT_C void | AppendL(const TUint16 *) |
IMPORT_C void | AppendL(const wchar_t *, TInt) |
IMPORT_C void | AppendL(const wchar_t *) |
IMPORT_C void | AppendNumFixedWidthL(TUint, TRadix, TInt) |
IMPORT_C void | AppendNumFixedWidthUCL(TUint, TRadix, TInt) |
IMPORT_C TInt | AppendNumL(TReal, const TRealFormat &) |
IMPORT_C void | AppendNumL(TInt64) |
IMPORT_C void | AppendNumL(TUint64, TRadix) |
IMPORT_C void | AppendNumUCL(TUint64, TRadix) |
IMPORT_C void | Assign(const LString16 &) |
IMPORT_C void | Assign(const RBuf16 &) |
IMPORT_C void | Assign(HBufC16 *) |
IMPORT_C void | Assign(TUint16 *, TInt) |
IMPORT_C void | Assign(TUint16 *, TInt, TInt) |
IMPORT_C TInt | Compare(const TUint16 *) |
IMPORT_C TInt | Compare(const wchar_t *) |
IMPORT_C TInt | CompareF(const TUint16 *) |
IMPORT_C TInt | CompareF(const wchar_t *) |
IMPORT_C void | Compress() |
IMPORT_C void | CopyCL(const TDesC16 &) |
IMPORT_C void | CopyCPL(const TDesC16 &) |
IMPORT_C void | CopyCPL(const TUint16 *) |
IMPORT_C void | CopyCPL(const wchar_t *) |
IMPORT_C void | CopyFL(const TDesC16 &) |
IMPORT_C void | CopyFL(const TUint16 *) |
IMPORT_C void | CopyFL(const wchar_t *) |
IMPORT_C void | CopyL(const TDesC16 &) |
IMPORT_C void | CopyL(const TUint16 *) |
IMPORT_C void | CopyL(const TDesC8 &) |
IMPORT_C void | CopyL(const TUint16 *, TInt) |
IMPORT_C void | CopyL(const wchar_t *) |
IMPORT_C void | CopyLCL(const TDesC16 &) |
IMPORT_C void | CopyLCL(const TUint16 *) |
IMPORT_C void | CopyLCL(const wchar_t *) |
IMPORT_C void | CopyUCL(const TDesC16 &) |
IMPORT_C void | CopyUCL(const TUint16 *) |
IMPORT_C void | CopyUCL(const wchar_t *) |
IMPORT_C void | CreateL(RReadStream &, TInt) |
IMPORT_C void | FillL(TChar, TInt) |
IMPORT_C void | FillZL(TInt) |
IMPORT_C TInt | Find(const TUint16 *) |
IMPORT_C TInt | Find(const wchar_t *) |
IMPORT_C TInt | Find(const wchar_t *, TInt) |
IMPORT_C TInt | FindF(const TUint16 *) |
IMPORT_C TInt | FindF(const wchar_t *) |
IMPORT_C TInt | FindF(const wchar_t *, TInt) |
IMPORT_C void | FormatL(TRefByValue< const TDesC16 >, ...) |
IMPORT_C void | FormatListL(const TDesC16 &, VA_LIST) |
IMPORT_C void | InsertL(TInt, const TDesC16 &) |
IMPORT_C void | InsertL(TInt, const TUint16 *) |
IMPORT_C void | InsertL(TInt, const wchar_t *) |
IMPORT_C void | JustifyL(const TDesC16 &, TInt, TAlign, TChar) |
IMPORT_C void | JustifyL(const TUint16 *, TInt, TAlign, TChar) |
IMPORT_C void | JustifyL(const wchar_t *, TInt, TAlign, TChar) |
IMPORT_C TInt | Match(const TUint16 *) |
IMPORT_C TInt | Match(const wchar_t *) |
IMPORT_C TInt | MatchF(const TUint16 *) |
IMPORT_C TInt | MatchF(const wchar_t *) |
IMPORT_C void | NumFixedWidthL(TUint, TRadix, TInt) |
IMPORT_C void | NumFixedWidthUCL(TUint, TRadix, TInt) |
IMPORT_C TInt | NumL(TReal, const TRealFormat &) |
IMPORT_C void | NumL(TInt64) |
IMPORT_C void | NumL(TUint64, TRadix) |
IMPORT_C void | NumUCL(TUint64, TRadix) |
IMPORT_C const TUint16 * | PtrZL() |
IMPORT_C void | ReplaceL(TInt, TInt, const TDesC16 &) |
IMPORT_C void | ReplaceL(TInt, TInt, const TUint16 *) |
IMPORT_C void | ReplaceL(TInt, TInt, const wchar_t *) |
IMPORT_C void | ReserveFreeCapacityL(TInt) |
IMPORT_C void | Reset() |
IMPORT_C void | SetLengthL(TInt) |
IMPORT_C void | SetMaxLengthL(TInt) |
IMPORT_C void | SwapL(TDes16 &) |
IMPORT_C void | SwapL(LString16 &) |
IMPORT_C void | ZeroTerminateL() |
IMPORT_C TBool | operator!=(const TUint16 *) |
IMPORT_C TBool | operator!=(const wchar_t *) |
IMPORT_C LString16 & | operator+=(TChar) |
IMPORT_C LString16 & | operator+=(const TDesC16 &) |
IMPORT_C LString16 & | operator+=(const TUint16 *) |
IMPORT_C LString16 & | operator+=(const wchar_t *) |
IMPORT_C TBool | operator<(const TUint16 *) |
IMPORT_C TBool | operator<(const wchar_t *) |
IMPORT_C TBool | operator<=(const TUint16 *) |
IMPORT_C TBool | operator<=(const wchar_t *) |
IMPORT_C LString16 & | operator=(const TDesC16 &) |
IMPORT_C LString16 & | operator=(const LString16 &) |
IMPORT_C LString16 & | operator=(const TUint16 *) |
IMPORT_C LString16 & | operator=(HBufC16 *) |
IMPORT_C LString16 & | operator=(const wchar_t *) |
IMPORT_C TBool | operator==(const TUint16 *) |
IMPORT_C TBool | operator==(const wchar_t *) |
IMPORT_C TBool | operator>(const TUint16 *) |
IMPORT_C TBool | operator>(const wchar_t *) |
IMPORT_C TBool | operator>=(const TUint16 *) |
IMPORT_C TBool | operator>=(const wchar_t *) |
Inherited Enumerations | |
---|---|
TDesC16:TPrefix |
Private Attributes | |
---|---|
TInt | iReserved |
Inherited Attributes | |
---|---|
RBuf16::@7 | |
RBuf16::__DECLARE_TEST | |
RBuf16::iEBufCPtrType | |
RBuf16::iEPtrType | |
TDes16::iMaxLength |
LSTRING_CONSTRUCTORS_MAY_LEAVE IMPORT_C | LString16 | ( | ) |
Default constructor.
Constructs a zero-length 16-bit resizable string descriptor.
Note that the resulting object owns no allocated memory yet. This default constructor never leaves.
IMPORT_C | LString16 | ( | TInt | aInitialCapacity | ) | [explicit] |
Constructor to create a 16-bit resizable string descriptor with an initial capacity.
The function allocates sufficient memory to contain descriptor data up to the specified initial maximum length.
The current length of the descriptor is set to zero. The maximum length of the descriptor is set to the specified value.
leave
KErrNoMemory If there is insufficient memory.
TInt aInitialCapacity | The maximum length of the descriptor. |
IMPORT_C | LString16 | ( | const TDesC16 & | aDes | ) |
Constructor to create a 16-bit resizable string descriptor to contain a copy of the specified (source) descriptor, or leave on failure.
The constructor allocates sufficient memory so that this string descriptor's maximum length is the same as the length of the source descriptor. Both the current length and the maximum length of this string descriptor are set to the length of the source descriptor.
The data contained in the source descriptor is copied into this string descriptor.
leave
KErrNoMemory If there is insufficient memory.
const TDesC16 & aDes | Source descriptor to be copied into this object. |
IMPORT_C | LString16 | ( | const TUint16 * | aZeroTerminatedString | ) |
Constructor to create a 16-bit resizable string descriptor containing a copy of the specified (source) zero-terminated string data, or leave on failure.
The constructor allocates sufficient memory so that this string descriptor's maximum length is the same as the length of the source string. Both the current length and the maximum length of this string descriptor are set to the length of the source string.
The data contained in the source string is copied into this string descriptor. The zero terminator is not copied.
leave
KErrNoMemory If there is insufficient memory.
const TUint16 * aZeroTerminatedString | A pointer to a zero-terminated string |
IMPORT_C | LString16 | ( | const LString16 & | aDes | ) |
Copy constructor to create a 16-bit resizable string descriptor to contain a copy of the specified (source) string descriptor's data, or leave on failure.
The constructor allocates sufficient memory so that this string descriptor's maximum length is the same as the length of the source string descriptor. Both the current length and the maximum length of this string descriptor are set to the length of the source descriptor.
The data contained in the source string descriptor is copied into this string descriptor.
leave
KErrNoMemory If there is insufficient memory.
const LString16 & aDes | Source string descriptor to be copied into this object. |
IMPORT_C | LString16 | ( | HBufC16 * | aHBuf | ) | [explicit] |
Constructor to create a 16-bit resizable string descriptor from a pre-allocated heap descriptor.
Transfers ownership of the specified heap descriptor to this object.
HBufC16 * aHBuf | The heap descriptor to be transferred to this object. This pointer can be NULL, which means that a zero length 16-bit resizable string descriptor is created. |
IMPORT_C | LString16 | ( | TUint16 * | aHeapCell, |
TInt | aMaxLength | |||
) | [explicit] |
Constructor to create a 16-bit resizable string descriptor from a pre-allocated raw heap buffer.
The allocated memory forms the buffer for this string descriptor. The current length of the descriptor is set to zero.
panic
USER 8 If the specified maximum length is greater then the size of the allocated heap cell, or the specified maximum length is NOT zero when the pointer to the heap cell is NULL.
IMPORT_C | LString16 | ( | TUint16 * | aHeapCell, |
TInt | aLength, | |||
TInt | aMaxLength | |||
) | [explicit] |
Constructor to create a 16-bit resizable string descriptor from a pre-allocated raw heap buffer.
The allocated memory forms the buffer for this string descriptor. The current length of the descriptor is set to the value of the second parameter.
panic
USER 8 If the specified maximum length is greater then the size of the allocated heap cell, or the specified length is greater then the specified maximum length, or the specified maximum length is NOT zero when the pointer to the heap cell is NULL.
IMPORT_C | LString16 | ( | const wchar_t * | aWideCharStr | ) |
Constructor to create a 16-bit resizable string descriptor containing a copy of the specified (source) zero-terminated wide character string data, or leave on failure.
The constructor allocates sufficient memory so that this string descriptor's maximum length is the same as the length of the source string. Both the current length and the maximum length of this string descriptor are set to the length of the source string.
The data contained in the source string is copied into this string descriptor. The zero terminator is not copied.
leave
KErrNoMemory If there is insufficient memory.
const wchar_t * aWideCharStr | A pointer to a zero-terminated wide character string |
IMPORT_C | ~LString16 | ( | ) |
Destructor.
Frees any heap-allocated resources owned by this string descriptor. It is safe to rely on this destructor to perform all necessary cleanup; it is not necessary use the cleanup stack or to call Close() manually.
IMPORT_C void | AppendFillL | ( | TChar | aChar, |
TInt | aLength | |||
) |
Appends and fills this descriptor with the specified character.
The descriptor is appended with the specified number of characters. and its length is changed to reflect this.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aLength is negative
void | AppendFormat | ( | TRefByValue< const TDesC16 > | aFmt, |
TDes16Overflow * | aOverflowHandler, | |||
... | ||||
) | [private] |
TRefByValue< const TDesC16 > aFmt | |
TDes16Overflow * aOverflowHandler | |
... |
void | AppendFormat | ( | TRefByValue< const TDesC16 > | aFmt, |
... | ||||
) | [private] |
TRefByValue< const TDesC16 > aFmt | |
... |
IMPORT_C void | AppendFormatL | ( | TRefByValue< const TDesC16 > | aFmt, |
... | ||||
) |
Formats and appends text onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
The function takes a format string and a variable number of arguments. The format string contains literal text, embedded with directives, for converting the trailing list of arguments into text.
The embedded directives are character sequences prefixed with the '' character. The literal text is simply copied into this descriptor unaltered while the '' directives are used to convert successive arguments from the trailing list. See the description of the Format() function.
Literal text is appended on a character by character basis, and the underlying buffer is grown as necessary to accommodate it.
Text converted from a trailing argument is appended as a complete string, and the underlying buffer is grown as necessary to accommodate it.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 12 if the format string has incorrect syntax.
TRefByValue< const TDesC16 > aFmt | The 16-bit non-modifiable descriptor containing the format string. The TRefByValue class provides a constructor which takes a TDesC16 type. |
... |
void | AppendFormatList | ( | const TDesC16 & | aFmt, |
VA_LIST | aList, | |||
TDes16Overflow * | aOverflowHandler = NULL | |||
) | [private] |
const TDesC16 & aFmt | |
VA_LIST aList | |
TDes16Overflow * aOverflowHandler = NULL |
IMPORT_C void | AppendFormatListL | ( | const TDesC16 & | aFmt, |
VA_LIST | aList | |||
) |
Formats and appends text onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
The behaviour of this function is the same as AppendFormatL(TRefByValue<const TDesC16> aFmt,TDes16Overflow *aOverflowHandler,...). In practice, it is better and easier to use AppendFormat(), passing a variable number of arguments as required by the format string.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
void | AppendJustify | ( | const TDesC16 & | Des, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) | [private] |
void | AppendJustify | ( | const TDesC16 & | Des, |
TInt | aLength, | |||
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) | [private] |
void | AppendJustify | ( | const TUint16 * | aZeroTerminatedString, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) | [private] |
void | AppendJustify | ( | const TUint16 * | aZeroTerminatedString, |
TInt | aLength, | |||
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) | [private] |
IMPORT_C void | AppendJustifyL | ( | const TDesC16 & | Des, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Appends data onto the end of this descriptor's data and justifies it.
The source of the appended data is an existing descriptor.
The target area is considered to be an area of specified width, immediately following this descriptor's existing data. Source data is copied into, and aligned within this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
const TDesC16 & Des | |
TInt aWidth | The width of the target area. If this has the specific negative value KDefaultJustifyWidth, then the width is re-set to the length of the data source. |
TAlign anAlignment | The alignment of the data within the target area. |
TChar aFill | The fill character used to pad the target area. |
IMPORT_C void | AppendJustifyL | ( | const TDesC16 & | Des, |
TInt | aLength, | |||
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Appends data onto the end of this descriptor's data and justifies it.
The source of the appended data is an existing descriptor.
The target area is considered to be an area of specified width, immediately following this descriptor's existing data. Source data is copied into, and aligned within this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
const TDesC16 & Des | |
TInt aLength | The length of data to be copied from the source descriptor. If this is greater than the width of the target area, then the length of data copied is limited to the width. The length of data to be copied must not be greater than the length of the source descriptor. Note that this condition is not automatically tested. |
TInt aWidth | The width of the target area. If this has the specific negative value KDefaultJustifyWidth, then the width is re-set to the length of the data source. |
TAlign anAlignment | The alignment of the data within the target area. |
TChar aFill | The fill character used to pad the target area. |
IMPORT_C void | AppendJustifyL | ( | const TUint16 * | aZeroTerminatedString, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Appends a zero terminated string onto the end of this descriptor's data and justifies it.
The zero terminator is not copied.
The target area is considered to be an area of specified width, immediately following this descriptor's existing data. Source data is copied into, and aligned within, this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
const TUint16 * aZeroTerminatedString | A pointer to a zero terminated string The length of the data to be copied is the smaller of: the length of the string (excluding the zero terminator), the width of the target area (only if this is not the explicit negative value KDefaultJustifyWidth). |
TInt aWidth | The width of the target area. If this has the specific negative value KDefaultJustifyWidth, then the width is re-set to the length of the zero terminated string (excluding the zero terminator). |
TAlign anAlignment | The alignment of the data within the target area. |
TChar aFill | The fill character used to pad the target area. |
IMPORT_C void | AppendJustifyL | ( | const TUint16 * | aString, |
TInt | aLength, | |||
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Appends data onto the end of this descriptor's data and justifies it.
The source of the appended data is a memory location.
The target area is considered to be an area of specified width, immediately following this descriptor's existing data. Source data is copied into, and aligned within, this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
panic
USER 17 if aLength is negative.
const TUint16 * aString | A pointer to a source memory location. |
TInt aLength | The length of data to be copied. If this is greater than the width of the target area, then the length of data copied is limited to the width. |
TInt aWidth | The width of the target area. If this has the specific negative value KDefaultJustifyWidth, then the width is re-set to the length of the data source. |
TAlign anAlignment | The alignment of the data within the target area. |
TChar aFill | The fill character used to pad the target area. |
IMPORT_C void | AppendJustifyL | ( | const wchar_t * | aWideCharStr, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Appends data onto the end of this descriptor's data and justifies it.
The source of the appended data is a memory location.
The target area is considered to be an area of specified width, immediately following this descriptor's existing data. Source data is copied into, and aligned within, this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
panic
USER 17 if aLength is negative.
const wchar_t * aWideCharStr | A pointer to a source memory location. |
TInt aWidth | The width of the target area. If this has the specific negative value KDefaultJustifyWidth, then the width is re-set to the length of the data source. |
TAlign anAlignment | |
TChar aFill | The fill character used to pad the target area. |
IMPORT_C void | AppendJustifyL | ( | const wchar_t * | aWideCharStr, |
TInt | aLength, | |||
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Appends data onto the end of this descriptor's data and justifies it.
The source of the appended data is a memory location.
The target area is considered to be an area of specified width, immediately following this descriptor's existing data. Source data is copied into, and aligned within, this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
panic
USER 17 if aLength is negative.
const wchar_t * aWideCharStr | |
TInt aLength | The length of data to be copied. If this is greater than the width of the target area, then the length of data copied is limited to the width. |
TInt aWidth | The width of the target area. If this has the specific negative value KDefaultJustifyWidth, then the width is re-set to the length of the data source. |
TAlign anAlignment | |
TChar aFill | The fill character used to pad the target area. |
IMPORT_C void | AppendL | ( | TChar | aChar | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TChar aChar | A single character to be appended. The length of the descriptor is incremented by one. |
IMPORT_C void | AppendL | ( | const TDesC16 & | aDes | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TDesC16 & aDes | A 16-bit non modifiable descriptor whose data is to be appended. |
IMPORT_C void | AppendL | ( | const TUint16 * | aBuf, |
TInt | aLength | |||
) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 17 if aLength is negative.
IMPORT_C void | AppendL | ( | const TUint16 * | aZeroTerminatedString | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 17 if aLength is negative.
const TUint16 * aZeroTerminatedString | A pointer to the data to be copied. |
IMPORT_C void | AppendL | ( | const wchar_t * | aWideCharStr, |
TInt | aLength | |||
) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 17 if aLength is negative.
const wchar_t * aWideCharStr | A pointer to the data to be copied. |
TInt aLength | The length of data to be copied. |
IMPORT_C void | AppendL | ( | const wchar_t * | aWideCharStr | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 17 if aLength is negative.
const wchar_t * aWideCharStr | A pointer to the data to be copied. |
TInt | AppendNum | ( | TReal | aVal, |
const TRealFormat & | aFormat | |||
) | [private] |
TReal aVal | |
const TRealFormat & aFormat |
void | AppendNumFixedWidth | ( | TUint | aVal, |
TRadix | aRadix, | |||
TInt | aWidth | |||
) | [private] |
IMPORT_C void | AppendNumFixedWidthL | ( | TUint | aVal, |
TRadix | aRadix, | |||
TInt | aWidth | |||
) |
Converts the specified unsigned integer into a fixed width character representation based on the specified number system and appends the conversion onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
The function generates the exact number of specified characters, either padding to the left with character zeroes or discarding low order characters as necessary.
When a hexadecimal conversion is specified, hexadecimal characters are in lower case.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
void | AppendNumFixedWidthUC | ( | TUint | aVal, |
TRadix | aRadix, | |||
TInt | aWidth | |||
) | [private] |
IMPORT_C void | AppendNumFixedWidthUCL | ( | TUint | aVal, |
TRadix | aRadix, | |||
TInt | aWidth | |||
) |
Converts the specified unsigned integer into a fixed width character representation based on the specified number system and appends the conversion onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
The function generates the exact number of specified characters, either padding to the left with character zeroes or discarding low order characters as necessary.
When a hexadecimal conversion is specified, hexadecimal characters are in upper case.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
IMPORT_C TInt | AppendNumL | ( | TReal | aVal, |
const TRealFormat & | aFormat | |||
) |
Converts the specified floating point number into a character representation and appends the conversion onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
The character representation of the real number is dictated by the specified format.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
If the conversion is successful, the length of this descriptor. If the conversion fails, a negative value indicating the cause of failure. In addition, extra information on the cause of the failure may be appended onto this descriptor. The possible values and their meaning are:
1.KErrArgument- the supplied floating point number is not a valid number. The three characters NaN are appended to this descriptor.
2.KErrOverflow - the number is too large to represent. 2.1 For positive overflow, the three characters Inf are appended to this descriptor. 2.2 For negative overflow, the four characters -Inf are appended to this descriptor.
3.KErrUnderflow - the number is too small to represent. 3.1 For positive underflow, the three characters Inf are appended to this descriptor. 3.2 For negative underflow, the four characters -Inf are appended to this descriptor.
4.KErrGeneral - the conversion cannot be completed. There are a number of possible reasons for this, but the most common is: 4.1 The character representation format (i.e. the format type), as defined in the TRealFormat object is not recognised.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TReal aVal | The floating point number to be converted. |
const TRealFormat & aFormat | The format of the conversion. |
IMPORT_C void | AppendNumL | ( | TInt64 | aVal | ) |
Converts the 64-bit signed integer into a decimal character representation and appends the conversion onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
If the integer is negative, the character representation is prefixed by a minus sign.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TInt64 aVal | The 64-bit signed integer value. |
IMPORT_C void | AppendNumL | ( | TUint64 | aVal, |
TRadix | aRadix | |||
) |
Converts the specified 64 bit integer into a character representation based on the specified number system and appends the conversion onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
When a hexadecimal conversion is specified, hexadecimal characters are in lower case.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
IMPORT_C void | AppendNumUCL | ( | TUint64 | aVal, |
TRadix | aRadix = EDecimal | |||
) |
Converts the specified 64 bit integer into a character representation based on the specified number system and appends the conversion onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
When a hexadecimal conversion is specified, hexadecimal characters are in upper case.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
IMPORT_C void | Assign | ( | const LString16 & | aString | ) |
Unlinks and transfers ownership of the specified 16-bit resizable descriptor's buffer to this object. The source descriptor is detached from the buffer.
const LString16 & aString | The source 16-bit resizable buffer. The ownership of this object's buffer is to be transferred. |
IMPORT_C void | Assign | ( | const RBuf16 & | aRBuf | ) |
Transfers ownership of the specified 16-bit resizable descriptor's buffer to this object. The source descriptor is detached from the buffer.
const RBuf16 & aRBuf | The source 16-bit resizable buffer. The ownership of this object's buffer is to be transferred. |
IMPORT_C void | Assign | ( | HBufC16 * | aHBuf | ) |
Transfers ownership of the specified 16-bit resizable descriptor's this object.
HBufC16 * aHBuf | The heap descriptor to be transferred to this object. The ownership of this object's buffer is to be transferred. |
IMPORT_C void | Assign | ( | TUint16 * | aHeapCell, |
TInt | aMaxLength | |||
) |
Assigns ownership of the specified allocated memory to this object.
panic
USER 8 If the specified maximum length is greater then the size of the allocated heap cell, or the specified maximum length is NOT zero when the pointer to the heap cell is NULL.
IMPORT_C void | Assign | ( | TUint16 * | aHeapCell, |
TInt | aLength, | |||
TInt | aMaxLength | |||
) |
Transfers ownership of the specified 16-bit resizable descriptor's this object.
panic
USER 8 If the specified maximum length is greater then the size of the allocated heap cell, or the specified length is greater then the specified maximum length, or the specified maximum length is NOT zero when the pointer to the heap cell is NULL.
IMPORT_C TInt | Compare | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Compares this descriptor's data with the specified string's data.
The comparison proceeds on a byte for byte basis. The result of the comparison is based on the difference of the first bytes to disagree.
Positive, if this descriptor is greater than the specified string. Negative, if this descriptor is less than the specified string. Zero, if both the descriptor and the string have the same length and the their contents are the same.
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be compared with this Descriptor's data. |
IMPORT_C TInt | Compare | ( | const wchar_t * | aWideCharStr | ) | const |
Compares this descriptor's data with the specified string's data.
The comparison proceeds on a byte for byte basis. The result of the comparison is based on the difference of the first bytes to disagree.
Positive, if this descriptor is greater than the specified string. Negative, if this descriptor is less than the specified string. Zero, if both the descriptor and the string have the same length and the their contents are the same.
const wchar_t * aWideCharStr | The wide character string whose data is to be compared with this Descriptor's data. |
IMPORT_C TInt | CompareF | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Compares this descriptor's folded data with the specified string's folded data.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used for comparing strings in natural language;
Positive, if this descriptor is greater than the specified string. Negative, if this descriptor is less than the specified string. Zero, if the descriptor and the specified string have the same length and the their contents are the same.
const TUint16 * aZeroTerminatedString | The wide Zero Terminated String whose data is to be compared with this string's data. |
IMPORT_C TInt | CompareF | ( | const wchar_t * | aWideCharStr | ) | const |
Compares this descriptor's folded data with the specified string's folded data.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used for comparing strings in natural language;
Positive, if this descriptor is greater than the specified string. Negative, if this descriptor is less than the specified string. Zero, if the descriptor and the specified string have the same length and the their contents are the same.
const wchar_t * aWideCharStr | The wide character string whose data is to be compared with this Descriptor's data. |
IMPORT_C void | Compress | ( | ) |
Re-allocates a smaller descriptor buffer space to the current descriptor length
This may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
If there is insufficient memory to re-allocate the buffer then the descriptor left unchanged
IMPORT_C void | CopyCL | ( | const TDesC16 & | aDes | ) |
Copies and collates data from the specified descriptor into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TDesC16 & aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyCPL | ( | const TDesC16 & | aDes | ) |
Copies text from the specified descriptor and capitalises it before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Capitalisation is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TDesC16 & aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyCPL | ( | const TUint16 * | aZeroTerminatedString | ) |
Copies text from the specified string and capitalises it before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Capitalisation is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TUint16 * aZeroTerminatedString | A wide zero terminated string. |
IMPORT_C void | CopyCPL | ( | const wchar_t * | aWideCharStr | ) |
Copies text from the specified string and capitalises it before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Capitalisation is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const wchar_t * aWideCharStr | A wide character string. |
IMPORT_C void | CopyFL | ( | const TDesC16 & | aDes | ) |
Copies and folds data from the specified descriptor into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used when dealing with strings in natural language.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TDesC16 & aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyFL | ( | const TUint16 * | aZeroTerminatedString | ) |
Copies and folds data from the specified string into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used when dealing with strings in natural language.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TUint16 * aZeroTerminatedString | A wide zero terminated string |
IMPORT_C void | CopyFL | ( | const wchar_t * | aWideCharStr | ) |
Copies and folds data from the specified string into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used when dealing with strings in natural language.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const wchar_t * aWideCharStr | A wide character string |
IMPORT_C void | CopyL | ( | const TDesC16 & | aDes | ) |
Copies data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
The length of this descriptor is set to reflect the new data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
const TDesC16 & aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyL | ( | const TUint16 * | aZeroTerminatedString | ) |
Copies data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
The length of this descriptor is set to reflect the new data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
const TUint16 * aZeroTerminatedString | A pointer to a zero-terminated string |
IMPORT_C void | CopyL | ( | const TDesC8 & | aDes | ) |
Copies 8-bit descriptor data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
The length of this descriptor is set to reflect the new data.
Each 8-bit character value is widened to a 16-bit character value as part of the copying process.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
const TDesC8 & aDes | An 8 bit non modifiable descriptor. |
IMPORT_C void | CopyL | ( | const TUint16 * | aBuf, |
TInt | aLength | |||
) |
Copies data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
The length of this descriptor is set according to the second parameter.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
panic
USER 11 if aLength is negative.
IMPORT_C void | CopyL | ( | const wchar_t * | aWideCharStr | ) |
Copies data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
panic
USER 11 if aLength is negative.
const wchar_t * aWideCharStr | A pointer to a wide character zero terminated string to be copied. |
IMPORT_C void | CopyLCL | ( | const TDesC16 & | aDes | ) |
Copies text from the specified descriptor and converts it to lower case before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Conversion to lower case is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TDesC16 & aDes | A 16-bit non modifiable descriptor. |
IMPORT_C void | CopyLCL | ( | const TUint16 * | aZeroTerminatedString | ) |
Copies text from the specified string and converts it to lower case before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Conversion to lower case is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TUint16 * aZeroTerminatedString | A wide zero terminated string. |
IMPORT_C void | CopyLCL | ( | const wchar_t * | aWideCharStr | ) |
Copies text from the specified string and converts it to lower case before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Conversion to lower case is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const wchar_t * aWideCharStr | A wide character string. |
IMPORT_C void | CopyUCL | ( | const TDesC16 & | aDes | ) |
Copies text from the specified descriptor and converts it to upper case before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Conversion to upper case is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TDesC16 & aDes | A 16-bit non modifiable descriptor. |
IMPORT_C void | CopyUCL | ( | const TUint16 * | aZeroTerminatedString | ) |
Copies text from the specified string and converts it to upper case before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Conversion to upper case is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TUint16 * aZeroTerminatedString | A wide zero terminated string. |
IMPORT_C void | CopyUCL | ( | const wchar_t * | aWideCharStr | ) |
Copies text from the specified string and converts it to upper case before putting it into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
Conversion to upper case is implemented as appropriate to the current locale.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const wchar_t * aWideCharStr | A wide character string. |
IMPORT_C void | CreateL | ( | RReadStream & | aStream, |
TInt | aMaxLength | |||
) |
Creates a 16-bit resizable buffer descriptor that has been initialised with data from the specified read stream; leaves on failure.
Data is assigned to the new descriptor from the specified stream. This variant assumes that the stream contains the length of the data followed by the data itself.
The function is implemented by calling the HBufC16::NewL(RReadStream&,TInt) variant and then assigning the resulting heap descriptor using the RBuf16::Assign(HBufC16*) variant. The comments that describe the HBufC16::NewL() variant also apply to this RBuf16::CreateL() function.
The function may leave with one of the system-wide error codes, specifically KErrOverflow, if the length of the data as read from the stream is greater than the upper limit as specified by the aMaxLength parameter.
RReadStream & aStream | The stream from which the data length and the data to be assigned to the new descriptor, are taken. |
TInt aMaxLength | The upper limit on the length of data that the descriptor is to represent. The value of this parameter must be non-negative otherwise the underlying function will panic. |
void | EnsureCapacityIncrementL | ( | TInt | aLengthIncrement | ) | [private] |
TInt aLengthIncrement |
IMPORT_C void | FillL | ( | TChar | aChar, |
TInt | aLength | |||
) |
Fills the descriptor's data area with the specified character, replacing any existing data.
The descriptor is filled with the specified number of characters, and its length is changed to reflect this.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aLength is negative
IMPORT_C void | FillZL | ( | TInt | aLength | ) |
Fills the descriptor's data area with binary zeroes, i.e. 0x0000, replacing any existing data, and changes its length.
The descriptor is filled with the specified number of binary zeroes. The descriptor's length is changed to reflect this.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aLength is negative
TInt aLength | The new length of the descriptor and the number of binary zeroes to be copied into it. |
IMPORT_C TInt | Find | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Searches for the first occurrence of the specified data sequence within this descriptor.
Searching always starts at the beginning of this descriptor's data.
The offset of the data sequence from the beginning of this descriptor's data. KErrNotFound, if the data sequence cannot be found.
const TUint16 * aZeroTerminatedString |
IMPORT_C TInt | Find | ( | const wchar_t * | aWideCharStr | ) | const |
Searches for the first occurrence of the specified data sequence within this descriptor.
Searching always starts at the beginning of this descriptor's data.
The offset of the data sequence from the beginning of this descriptor's data. KErrNotFound, if the data sequence cannot be found.
const wchar_t * aWideCharStr | The wide character string whose data is to be searched for, within this Descriptor's data. |
IMPORT_C TInt | Find | ( | const wchar_t * | aWideCharStr, |
TInt | aLenS | |||
) | const |
Searches for the first occurrence of the specified data sequence within this descriptor.
Searching always starts at the beginning of this descriptor's data.
The offset of the data sequence from the beginning of this descriptor's data. KErrNotFound, if the data sequence cannot be found.
panic
USER 29 if aLenS is negative.
const wchar_t * aWideCharStr | The wide character string whose data is to be searched for, within this Descriptor's data. |
TInt aLenS | The length of the data sequence to be searched for. This value must not be negative, otherwise the function raises a panic. |
IMPORT_C TInt | FindF | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Searches for the first occurrence of the specified folded data sequence within this descriptor's folded data.
Searching always starts at the beginning of this descriptor's data.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used for finding strings in natural language;
The offset of the data sequence from the beginning of this descriptor's data. KErrNotFound, if the data sequence cannot be found. Zero, if the length of the search data sequence is zero.
const TUint16 * aZeroTerminatedString |
IMPORT_C TInt | FindF | ( | const wchar_t * | aWideCharStr | ) | const |
Searches for the first occurrence of the specified folded data sequence within this descriptor's folded data.
Searching always starts at the beginning of this descriptor's data.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used for finding strings in natural language;
The offset of the data sequence from the beginning of this descriptor's data. KErrNotFound, if the data sequence cannot be found. Zero, if the length of the search data sequence is zero.
const wchar_t * aWideCharStr | The wide character string whose data is to be searched for, within this Descriptor's data. |
IMPORT_C TInt | FindF | ( | const wchar_t * | aWideCharStr, |
TInt | aLenS | |||
) | const |
Searches for the first occurrence of the specified folded data sequence within this descriptor's folded data.
Searching always starts at the beginning of this descriptor's data.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used for finding strings in natural language;
The offset of the data sequence from the beginning of this descriptor's data. KErrNotFound, if the data sequence cannot be found. Zero, if the length of the search data sequence is zero.
panic
USER 29 if aLenS is negative
const wchar_t * aWideCharStr | The wide character string whose data is to be searched for, within this Descriptor's data. |
TInt aLenS | The length of the data sequence to be searched for. This value must not be negative, otherwise the function raises a panic. |
void | Format | ( | TRefByValue< const TDesC16 > | aFmt, |
... | ||||
) | [private] |
TRefByValue< const TDesC16 > aFmt | |
... |
IMPORT_C void | FormatL | ( | TRefByValue< const TDesC16 > | aFmt, |
... | ||||
) |
Formats and copies text into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
The function takes a format string and a variable number of arguments. The format string contains literal text embedded with directives for converting the trailing list of arguments into text.
The embedded directives are character sequences prefixed with the '' character. The literal text is simply copied into this descriptor unaltered while the '' directives are used to convert successive arguments from the trailing list.
The resulting stream of literal text and converted arguments is copied into this descriptor.
The syntax of the embedded directives follows one of four general patterns.
Note that formatting of single numerical values can be achieved more conveniently using the Num() and NumUC() member functions of this class.
The full description of the syntax of a format string cannot be included here. For full details, navigate to the Symbian OS guide, and follow the hierarchy of links:
Symbian OS Guide Base Using User Library (E32) Buffers and Strings Using Descriptors How to Use Descriptors Format string syntax
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
panic
USER 12 if the format string has incorrect syntax.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TRefByValue< const TDesC16 > aFmt | The descriptor containing the format string. The TRefByValue class provides a constructor which takes a TDesC8 type. |
... |
IMPORT_C void | FormatListL | ( | const TDesC16 & | aFmt, |
VA_LIST | aList | |||
) |
Formats and copies text into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
The behaviour of this function is the same as FormatL(). In practice, it is better and easier to use FormatL(), passing a variable number of arguments as required by the format string.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
IMPORT_C void | InsertL | ( | TInt | aPos, |
const TDesC16 & | aDes | |||
) |
Inserts data into this descriptor.
The length of this descriptor is changed to reflect the extra data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 10 if aPos is negative or is greater than the length of this descriptor.
IMPORT_C void | InsertL | ( | TInt | aPos, |
const TUint16 * | aZeroTerminatedString | |||
) |
Inserts data into this descriptor.
The length of this descriptor is changed to reflect the extra data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 10 if aPos is negative or is greater than the length of this descriptor.
IMPORT_C void | InsertL | ( | TInt | aPos, |
const wchar_t * | aWideCharStr | |||
) |
Inserts data into this descriptor.
The length of this descriptor is changed to reflect the extra data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 10 if aPos is negative or is greater than the length of this descriptor.
TInt aPos | The position within the data where insertion is to start. This is an offset value; a zero value refers to the leftmost data position. |
const wchar_t * aWideCharStr | A wide character string. |
void | Justify | ( | const TDesC16 & | aDes, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) | [private] |
IMPORT_C void | JustifyL | ( | const TDesC16 & | aDes, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Copies data into this descriptor and justifies it, replacing any existing data.
The length of this descriptor is set to reflect the new data.
The target area is considered to be an area of specified width positioned at the beginning of this descriptor's data area. Source data is copied into, and aligned within this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
const TDesC16 & aDes | A 16-bit non-modifiable descriptor containing the source data. The length of the data to be copied is the smaller of: the length of the source descriptor, and the width of the target area (only if this is not the explicit negative value KDefaultJustifyWidth). |
TInt aWidth | The width of the target area. If this has the specific negative value KDefaultJustifyWidth, then the width is re-set to the length of the data source. |
TAlign anAlignment | The alignment of the data within the target area |
TChar aFill | The fill character used to pad the target area. |
IMPORT_C void | JustifyL | ( | const TUint16 * | aZeroTerminatedString, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Copies data into this descriptor and justifies it, replacing any existing data.
The length of this descriptor is set to reflect the new data.
The target area is considered to be an area of specified width positioned at the beginning of this descriptor's data area. Source data is copied into, and aligned within this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
IMPORT_C void | JustifyL | ( | const wchar_t * | aWideCharStr, |
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
Copies data into this descriptor and justifies it, replacing any existing data.
The length of this descriptor is set to reflect the new data.
The target area is considered to be an area of specified width positioned at the beginning of this descriptor's data area. Source data is copied into, and aligned within this target area according to the specified alignment instruction.
If the length of the target area is larger than the length of the source, then spare space within the target area is padded with the fill character.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aWidth has a negative value other than KDefaultJustifyWidth.
const wchar_t * aWideCharStr | A wide character string containing the source data. The length of the data to be copied is the smaller of: the length of the source descriptor, and the width of the target area (only if this is not the explicit negative value KDefaultJustifyWidth). |
TInt aWidth | The width of the target area. If this has the specific negative value KDefaultJustifyWidth, then the width is re-set to the length of the data source. |
TAlign anAlignment | |
TChar aFill | The fill character used to pad the target area. |
IMPORT_C TInt | Match | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Searches this descriptor's data for a match with the match pattern supplied in the specified string.
The match pattern can contain the wildcard characters "*" and "?", where "*" matches zero or more consecutive occurrences of any character and "?" matches a single occurrence of any character.
Note that there is no 'escape character', which means that it is not possible to match either the "*" character itself or the "?" character itself using this function.
If a match is found, the offset within this descriptor's data where the match first occurs. KErrNotFound, if there is no match.
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be matched with this Descriptor's data. |
IMPORT_C TInt | Match | ( | const wchar_t * | aWideCharStr | ) | const |
Searches this descriptor's data for a match with the match pattern supplied in the specified string.
The match pattern can contain the wildcard characters "*" and "?", where "*" matches zero or more consecutive occurrences of any character and "?" matches a single occurrence of any character.
Note that there is no 'escape character', which means that it is not possible to match either the "*" character itself or the "?" character itself using this function.
If a match is found, the offset within this descriptor's data where the match first occurs. KErrNotFound, if there is no match.
const wchar_t * aWideCharStr | The wide character string whose data is to be matched with this Descriptor's data. |
IMPORT_C TInt | MatchF | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Searches this descriptor's folded data for a match with the folded match pattern supplied in the specified string.
The match pattern can contain the wildcard characters "*" and "?", where "*" matches zero or more consecutive occurrences of any character and "?" matches a single occurrence of any character.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used for matching strings in natural language; use MatchC() for this.
Note that there is no 'escape character', which means that it is not possible to match either the "*" character itself or the "?" character itself using this function.
If a match is found, the offset within this descriptor's data where the match first occurs. KErrNotFound, if there is no match.
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be matched with this Descriptor's data. |
IMPORT_C TInt | MatchF | ( | const wchar_t * | aWideCharStr | ) | const |
Searches this descriptor's folded data for a match with the folded match pattern supplied in the specified string.
The match pattern can contain the wildcard characters "*" and "?", where "*" matches zero or more consecutive occurrences of any character and "?" matches a single occurrence of any character.
Note that folding is locale-independent behaviour. It is also important to note that there can be no guarantee that folding is in any way culturally appropriate, and should not be used for matching strings in natural language; use MatchC() for this.
Note that there is no 'escape character', which means that it is not possible to match either the "*" character itself or the "?" character itself using this function.
If a match is found, the offset within this descriptor's data where the match first occurs. KErrNotFound, if there is no match.
const wchar_t * aWideCharStr | The wide character string whose data is to be matched with this Descriptor's data. |
TInt | Num | ( | TReal | aVal, |
const TRealFormat & | aFormat | |||
) | [private] |
TReal aVal | |
const TRealFormat & aFormat |
IMPORT_C void | NumFixedWidthL | ( | TUint | aVal, |
TRadix | aRadix, | |||
TInt | aWidth | |||
) |
Converts the specified unsigned integer into a fixed width character representation based on the specified number system and copies the conversion into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
The function generates the exact number of specified characters, either padding to the left with character zeroes or discarding low order characters as necessary.
When a hexadecimal conversion is specified, hexadecimal characters are in lower case.
This function is equivalent to using Format() with parameters which specify:
1. a fixed length target field
2. padding with zero characters, for example "%08x".
When this is the case, always use NumFixedWidth() in preference to Format() as it is more efficient.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
void | NumFixedWidthUC | ( | TUint | aVal, |
TRadix | aRadix, | |||
TInt | aWidth | |||
) | [private] |
IMPORT_C void | NumFixedWidthUCL | ( | TUint | aVal, |
TRadix | aRadix, | |||
TInt | aWidth | |||
) |
Converts the specified unsigned integer into a fixed width character representation based on the specified number system and copies the conversion into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
The function generates the exact number of specified characters, either padding to the left with character zeroes or discarding low order characters as necessary.
When a hexadecimal conversion is specified, hexadecimal characters are in upper case.
This function is equivalent to using Format() with parameters which specify:
1. a fixed length target field
2. padding with zero characters, for example "%08x".
When this is the case, always use NumFixedWidthUC() in preference to Format() as it is more efficient.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
IMPORT_C TInt | NumL | ( | TReal | aVal, |
const TRealFormat & | aFormat | |||
) |
Converts the specified floating point number into a character representation and copies the conversion into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
The character representation of the real number is dictated by the specified format.
Note that the function leaves if the iType data member of the specified TRealFormat object has both an invalid character representation format (i.e. the format type) and invalid format flags.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
If the conversion is successful, the length of this descriptor. If the conversion fails, a negative value indicating the cause of failure. In addition, extra information on the cause of the failure may be appended onto this descriptor. The possible values and their meaning are:
1.KErrArgument- the supplied floating point number is not a valid number. The three characters NaN are appended to this descriptor.
2.KErrOverflow - the number is too large to represent. 2.1 For positive overflow, the three characters Inf are appended to this descriptor. 2.2 For negative overflow, the four characters -Inf are appended to this descriptor.
3.KErrUnderflow - the number is too small to represent. 3.1 For positive underflow, the three characters Inf are appended to this descriptor. 3.2 For negative underflow, the four characters -Inf are appended to this descriptor.
4.KErrGeneral - the conversion cannot be completed. There are a number of possible reasons for this, but the most common is: 4.1 The character representation format (i.e. the format type), as defined in the TRealFormat object is not recognised.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TReal aVal | The floating point number to be converted. |
const TRealFormat & aFormat | The format of the conversion. |
IMPORT_C void | NumL | ( | TInt64 | aVal | ) |
Converts the 64-bit signed integer into a decimal character representation and copies the conversion into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
If the integer is negative, the character representation is prefixed by a minus sign.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TInt64 aVal | The 64-bit signed integer value. |
IMPORT_C void | NumL | ( | TUint64 | aVal, |
TRadix | aRadix | |||
) |
Converts the specified 64 bit unsigned integer into a character representation based on the specified number system and copies the conversion into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
When a hexadecimal conversion is specified, hexadecimal characters are in lower case.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
IMPORT_C void | NumUCL | ( | TUint64 | aVal, |
TRadix | aRadix = EDecimal | |||
) |
Converts the specified 64 bit unsigned integer into a character representation based on the specified number system and copies the conversion into this descriptor, replacing any existing data.
The length of this descriptor is set to reflect the new data.
When a hexadecimal conversion is specified, hexadecimal characters are in upper case.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
IMPORT_C const TUint16 * | PtrZL | ( | ) |
Appends a zero terminator onto the end of this descriptor's data and returns a pointer to the data.
The length of the descriptor is not changed, but the capacity of the descriptor may need to be grown to accommodate the zero terminator.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
A pointer to the descriptor's zero terminated data.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
void | Replace | ( | TInt | aPos, |
TInt | aLength, | |||
const TDesC16 & | aDes | |||
) | [private] |
IMPORT_C void | ReplaceL | ( | TInt | aPos, |
TInt | aLength, | |||
const TDesC16 & | aDes | |||
) |
Replaces data in this descriptor.
The specified length can be different to the length of the replacement data. The length of this descriptor changes to reflect the change of data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 8 if aLength is negative
panic
USER 10 if aPos is negative or is greater than the length of this descriptor.
panic
USER 16 if the length of the source descriptor aDes is negative
TInt aPos | The position within the data where replacement is to start. This is an offset value; a zero value refers to the leftmost data position. |
TInt aLength | The length of data to be replaced. |
const TDesC16 & aDes | The source 16-bit non modifiable descriptor whose data is to replace the target descriptor's data at aPos. |
IMPORT_C void | ReplaceL | ( | TInt | aPos, |
TInt | aLength, | |||
const TUint16 * | aZeroTerminatedString | |||
) |
Replaces data in this descriptor.
The specified length can be different to the length of the replacement data. The length of this descriptor changes to reflect the change of data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 8 if aLength is negative
panic
USER 10 if aPos is negative or is greater than the length of this descriptor.
panic
USER 16 if the length of the source descriptor aDes is negative
IMPORT_C void | ReplaceL | ( | TInt | aPos, |
TInt | aLength, | |||
const wchar_t * | aWideCharStr | |||
) |
Replaces data in this descriptor.
The specified length can be different to the length of the replacement data. The length of this descriptor changes to reflect the change of data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 8 if aLength is negative
panic
USER 10 if aPos is negative or is greater than the length of this descriptor.
panic
USER 16 if the length of the source descriptor aDes is negative
void | ReserveCapacityGrowExponentialL | ( | TInt | aRequiredCapacity | ) | [private] |
Guarantees that MaxLength() is greater than or equal to the supplied integer parameter, growing the underlying heap buffer if necessary.
The growth is exponential; maxLength *= 1.5 This is reported to give an amortised complexity of O(n) when adding n characters. If the required capacity is larger than the expanded size then the required capacity is used instead.
The actual value of MaxLength() after a call may differ from the exact value requested, but if it does differ it will always be greater. This flexibility allows the implementation to manage heap buffers more efficiently.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TInt aRequiredCapacity | The minimum value of MaxLength() required |
void | ReserveCapacityGrowExponentialL | ( | ) | [private] |
Grows the underlying buffer using the exponential growth function. Guarantees that MaxLength() is greater than or equal to 1.5 * the current MaxLength.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
void | ReserveFreeCapacityGrowExponentialL | ( | TInt | aRequiredEmptySpace | ) | [private] |
Guarantees that free space in the buffer greater than or equal the supplied integer parameter, growing the underlying heap buffer if necessary.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TInt aRequiredEmptySpace | The minimum value of free space required |
IMPORT_C void | ReserveFreeCapacityL | ( | TInt | aExtraSpaceLength | ) |
Ensures that the remaining unused space is more than the supplied value.
May reallocate a larger storage space to meet the requirement. As a result MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
Typically, you use this method to reserve a known amount of required space in one go instead of relying on the automatic growth pattern.
leave
KErrNoMemory if the the buffer needs to be reallocated and there are insufficient resources to do so.
panic
USER 11 if aLength is negative
TInt aExtraSpaceLength | The extra space required. |
void | ReserveL | ( | TInt | aMinRequiredCapacity | ) | [private] |
Guarantees that MaxLength() is greater than or equal to the supplied capacity, reallocating the supplied capacity if necessary.
The actual value of MaxLength() after a call may differ from the exact value requested, but if it does differ it will always be greater. This flexibility allows the implementation to manage heap buffers more efficiently.
The string descriptor's heap buffer may be reallocated in order to accommodate the new size. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TInt aMinRequiredCapacity | The minimum value of MaxLength() required |
IMPORT_C void | SetLengthL | ( | TInt | aLength | ) |
Sets the length of the data represented by the string descriptor to the specified value.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if aLength is negative
TInt aLength | The new length of the descriptor. |
IMPORT_C void | SetMaxLengthL | ( | TInt | aMaxLength | ) |
Sets the storage space allocated to this descriptor to the specified value by growing or compressing its buffer size.
If the current length of the descriptor is greater than the specified max length, length is truncated to max length.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the the buffer needs to be reallocated and there are insufficient resources to do so
panic
USER 11 if aLength is negative
TInt aMaxLength | The new maximum length of the descriptor. |
IMPORT_C void | SwapL | ( | TDes16 & | aDes | ) |
Swaps the data represented by this descriptor with the data represented by the specified descriptor.
The lengths of both descriptors are also swapped to reflect the change.
Note that each descriptor must be capable of accommodating the contents of the other descriptor.
Each descriptor must be capable of accommodating the contents of the other descriptor. If the maximum length of the descriptor parameter is smaller than the length of the target LString16, then the function raises a USER 11 panic. The target LString16 will be grown if necessary to accommodate the descriptor parameter's data.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
panic
USER 11 if the maximum length of the descriptor parameter is smaller than the length of the target LString16
TDes16 & aDes | The 16-bit modifiable descriptor whose data is to be swapped with the data of this descriptor. |
IMPORT_C void | SwapL | ( | LString16 & | aDes | ) |
Swaps the data represented by this string descriptor with the data represented by the specified string descriptor.
The lengths of both string descriptors are also swapped to reflect the change, and their buffers grown as necessary to accommodate the data they receive.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if one of the underlying buffers needs to be grown and there are insufficient resources to do so
LString16 & aDes | The 16-bit modifiable string descriptor whose data is to be swapped with the data of this descriptor. |
IMPORT_C void | ZeroTerminateL | ( | ) |
Appends a zero terminator onto the end of this descriptor's data.
The length of the descriptor is not changed, but the capacity of the descriptor may need to be grown to accommodate the zero terminator.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
IMPORT_C TBool | operator!= | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Determines whether this descriptor's data is not equal to the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is not equal to the specified string's data
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator!= | ( | const wchar_t * | aWideCharStr | ) | const |
Determines whether this descriptor's data is not equal to the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is not equal to the specified string's data
const wchar_t * aWideCharStr | The wide character string whose data is to be compared with this Descriptor's data. |
IMPORT_C LString16 & | operator+= | ( | TChar | aChar | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
TChar aChar | A single character to be appended. The length of the descriptor is incremented by one. |
IMPORT_C LString16 & | operator+= | ( | const TDesC16 & | aDes | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TDesC16 & aDes | A 16-bit non modifiable descriptor whose data is to be appended. |
IMPORT_C LString16 & | operator+= | ( | const TUint16 * | aZeroTerminatedString | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const TUint16 * aZeroTerminatedString | A pointer to a zero terminated string . |
IMPORT_C LString16 & | operator+= | ( | const wchar_t * | aWideCharStr | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
This leaving variant of the standard, non-leaving descriptor method differs in that this operation may cause the string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
leave
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so
const wchar_t * aWideCharStr | A pointer to a wide character zero terminated string . |
IMPORT_C TBool | operator< | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Determines whether this descriptor's data is less than the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is less than that of the specified string's data
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator< | ( | const wchar_t * | aWideCharStr | ) | const |
Determines whether this descriptor's data is less than the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is less than that of the specified string's data
const wchar_t * aWideCharStr | The wide character string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator<= | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Determines whether this descriptor's data is less than/equal to the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is less than/equal to that of the specified string's data
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator<= | ( | const wchar_t * | aWideCharStr | ) | const |
Determines whether this descriptor's data is less than the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is less than that of the specified string's data
const wchar_t * aWideCharStr | The wide character string whose data is to be compared with this Descriptor's data. |
IMPORT_C LString16 & | operator= | ( | const TDesC16 & | aDes | ) |
Copies data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
The length of this descriptor is set to reflect the new data.
This operation may cause the target string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
Note that the automatic resizing performed is a change to the functionality of this operation compared to other descriptor classes. This change is only active on objects directly declared LString16; when LString16 instances are instead manipulated via references to TDes16 or TDesC16, the standard (non-resizing, panicing) variant is invoked.
A reference to this 16-bit string descriptor.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
const TDesC16 & aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C LString16 & | operator= | ( | const LString16 & | aDes | ) |
Copies data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
The length of this descriptor is set to reflect the new data.
This operation may cause the target string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
Note that the automatic resizing performed is a change to the functionality of this operation compared to other descriptor classes. This change is only active on objects directly declared LString16; when LString16 instances are instead manipulated via references to TDes16 or TDesC16, the standard (non-resizing, panicing) variant is invoked.
A reference to this 16-bit string descriptor.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
const LString16 & aDes | A 16-bit string descriptor. |
IMPORT_C LString16 & | operator= | ( | const TUint16 * | aZeroTerminatedString | ) |
Copies data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
The length of this descriptor is set to reflect the new data.
This operation may cause the target string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
Note that the automatic resizing performed is a change to the functionality of this operation compared to other descriptor classes. This change is only active on objects directly declared LString16; when LString16 instances are instead manipulated via references to TDes16 or TDesC16, the standard (non-resizing, panicing) variant is invoked.
A reference to this 16-bit string descriptor.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
const TUint16 * aZeroTerminatedString | A pointer to a zero-terminated string |
IMPORT_C LString16 & | operator= | ( | HBufC16 * | aHBuf | ) |
Transfers ownership of the specified 16-bit resizable descriptor's this object.
A reference to this 16-bit string descriptor.
HBufC16 * aHBuf | The source 16-bit resizable buffer. The ownership of this object's buffer is to be transferred. |
IMPORT_C LString16 & | operator= | ( | const wchar_t * | aWideCharStr | ) |
Copies data into this 16-bit string descriptor, replacing any existing data, and expanding its heap buffer to accommodate if necessary.
The length of this descriptor is set to reflect the new data.
This operation may cause the target string descriptor's heap buffer to be reallocated in order to accommodate the new data. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.
Note that the automatic resizing performed is a change to the functionality of this operation compared to other descriptor classes. This change is only active on objects directly declared LString16; when LString16 instances are instead manipulated via references to TDes16 or TDesC16, the standard (non-resizing, panicing) variant is invoked.
A reference to this 16-bit string descriptor.
leave
KErrNoMemory If the heap buffer of the string descriptor being assigned to needs to be expanded, but there is insufficient memory to do so
const wchar_t * aWideCharStr | A pointer to a wide character zero-terminated string |
IMPORT_C TBool | operator== | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Determines whether this Descriptor's data is equal to the specified string's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if equal, false otherwise.
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator== | ( | const wchar_t * | aWideCharStr | ) | const |
Determines whether this Descriptor's data is equal to the specified string's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if equal, false otherwise.
const wchar_t * aWideCharStr | The wide character string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator> | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Determines whether this descriptor's data is greater than the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is greater than that of the specified string's data
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator> | ( | const wchar_t * | aWideCharStr | ) | const |
Determines whether this descriptor's data is greater than the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is greater than that of the specified string's data
const wchar_t * aWideCharStr | The wide character string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator>= | ( | const TUint16 * | aZeroTerminatedString | ) | const |
Determines whether this descriptor's data is greater than the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is greater than that of the specified string's data
const TUint16 * aZeroTerminatedString | The wide Zero TerminatedString string whose data is to be compared with this Descriptor's data. |
IMPORT_C TBool | operator>= | ( | const wchar_t * | aWideCharStr | ) | const |
Determines whether this descriptor's data is greater than/equal to the specified strings's data.
The comparison is implemented internally using the TDesC::Compare() function.
True if this descriptor's data is greater than/equal to that of the specified string's data
const wchar_t * aWideCharStr | The wide character string whose data is to be compared with this Descriptor's data. |