#include <e32des16.h>
class TDes16 : public TDesC16 |
Protected Attributes | |
---|---|
__DECLARE_TEST | |
TInt | iMaxLength |
Public Member Functions | |
---|---|
IMPORT_C void | Append(TChar) |
IMPORT_C void | Append(const TDesC16 &) |
IMPORT_C void | Append(const TUint16 *, TInt) |
IMPORT_C void | Append2(TChar) |
IMPORT_C void | AppendFill(TChar, TInt) |
IMPORT_C void | AppendFill2(TChar, TInt) |
IMPORT_C void | AppendFormat(TRefByValue< const TDesC16 >, TDes16Overflow *, ...) |
IMPORT_C void | AppendFormat(TRefByValue< const TDesC16 >, ...) |
IMPORT_C void | AppendFormatList(const TDesC16 &, VA_LIST, TDes16Overflow *) |
IMPORT_C void | AppendJustify(const TDesC16 &, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustify(const TDesC16 &, TInt, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustify(const TUint16 *, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustify(const TUint16 *, TInt, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustify2(const TDesC16 &, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustify2(const TDesC16 &, TInt, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustify2(const TUint16 *, TInt, TAlign, TChar) |
IMPORT_C void | AppendJustify2(const TUint16 *, TInt, TInt, TAlign, TChar) |
IMPORT_C TInt | AppendNum(TReal, const TRealFormat &) |
IMPORT_C void | AppendNum(TInt64) |
IMPORT_C void | AppendNum(TUint64, TRadix) |
IMPORT_C void | AppendNumFixedWidth(TUint, TRadix, TInt) |
IMPORT_C void | AppendNumFixedWidthUC(TUint, TRadix, TInt) |
IMPORT_C void | AppendNumUC(TUint64, TRadix) |
IMPORT_C void | Capitalize() |
IMPORT_C void | Capitalize2() |
IMPORT_C TPtr8 | Collapse() |
IMPORT_C void | Collate() |
IMPORT_C void | Collate2() |
IMPORT_C void | Copy(const TDesC8 &) |
IMPORT_C void | Copy(const TDesC16 &) |
IMPORT_C void | Copy(const TUint16 *, TInt) |
IMPORT_C void | Copy(const TUint16 *) |
IMPORT_C void | CopyC(const TDesC16 &) |
IMPORT_C void | CopyC2(const TDesC16 &) |
IMPORT_C void | CopyCP(const TDesC16 &) |
IMPORT_C void | CopyCP2(const TDesC16 &) |
IMPORT_C void | CopyF(const TDesC16 &) |
IMPORT_C void | CopyF2(const TDesC16 &) |
IMPORT_C void | CopyLC(const TDesC16 &) |
IMPORT_C void | CopyLC2(const TDesC16 &) |
IMPORT_C void | CopyUC(const TDesC16 &) |
IMPORT_C void | CopyUC2(const TDesC16 &) |
IMPORT_C void | Delete(TInt, TInt) |
IMPORT_C void | Fill(TChar) |
IMPORT_C void | Fill(TChar, TInt) |
IMPORT_C void | Fill2(TChar) |
IMPORT_C void | Fill2(TChar, TInt) |
IMPORT_C void | FillZ() |
IMPORT_C void | FillZ(TInt) |
IMPORT_C void | Fold() |
IMPORT_C void | Fold2() |
IMPORT_C void | Format(TRefByValue< const TDesC16 >, ...) |
IMPORT_C void | FormatList(const TDesC16 &, VA_LIST) |
IMPORT_C void | Insert(TInt, const TDesC16 &) |
IMPORT_C void | Justify(const TDesC16 &, TInt, TAlign, TChar) |
IMPORT_C void | Justify2(const TDesC16 &, TInt, TAlign, TChar) |
IMPORT_C TPtr16 | LeftTPtr(TInt) |
IMPORT_C void | LowerCase() |
IMPORT_C void | LowerCase2() |
TInt | MaxLength() |
TInt | MaxSize() |
IMPORT_C TPtr16 | MidTPtr(TInt) |
IMPORT_C TPtr16 | MidTPtr(TInt, TInt) |
IMPORT_C TInt | Num(TReal, const TRealFormat &) |
IMPORT_C void | Num(TInt64) |
IMPORT_C void | Num(TUint64, TRadix) |
IMPORT_C void | NumFixedWidth(TUint, TRadix, TInt) |
IMPORT_C void | NumFixedWidthUC(TUint, TRadix, TInt) |
IMPORT_C void | NumUC(TUint64, TRadix) |
IMPORT_C const TUint16 * | PtrZ() |
IMPORT_C void | Repeat(const TDesC16 &) |
IMPORT_C void | Repeat(const TUint16 *, TInt) |
IMPORT_C void | Replace(TInt, TInt, const TDesC16 &) |
IMPORT_C TPtr16 | RightTPtr(TInt) |
IMPORT_C void | SetLength(TInt) |
IMPORT_C void | SetMax() |
IMPORT_C void | Swap(TDes16 &) |
IMPORT_C void | Trim() |
IMPORT_C void | TrimAll() |
IMPORT_C void | TrimLeft() |
IMPORT_C void | TrimRight() |
IMPORT_C void | UpperCase() |
IMPORT_C void | UpperCase2() |
IMPORT_C void | Zero() |
IMPORT_C void | ZeroTerminate() |
TDes16 & | operator+=(const TDesC16 &) |
TDes16 & | operator=(const TUint16 *) |
TDes16 & | operator=(const TDesC16 &) |
TDes16 & | operator=(const TDes16 &) |
const TUint16 & | operator[](TInt) |
TUint16 & | operator[](TInt) |
Protected Member Functions | |
---|---|
TDes16() | |
TDes16(TInt, TInt, TInt) | |
void | DoAppendNum(TUint64, TRadix, TUint, TInt) |
void | DoPadAppendNum(TInt, TInt, const TUint8 *) |
TUint16 * | WPtr() |
Inherited Enumerations | |
---|---|
TDesC16:TPrefix |
Abstract base class for 16-bit modifiable descriptors.
The class encapsulates the data member containing the maximum length of data represented by a 16-bit descriptor. It also provides member functions through which the data can be modified.
The class adds to the behaviour provided by TDesC16.
This class cannot be instantiated as it is intended to form part of a class hierarchy; it provides a well defined part of descriptor behaviour. It can, however, be passed as an argument type for functions which need to both modify and access descriptor data.
__DECLARE_TEST | [protected] |
TInt | iMaxLength | [protected] |
TDes16 | ( | ) | [protected, inline] |
IMPORT_C void | Append | ( | TChar | aChar | ) |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
USER 11 if the resulting new length of this descriptor is greater than its maximum length.
Parameters | |
---|---|
aChar | A single character to be appended. The length of the descriptor is incremented by one. |
IMPORT_C void | Append | ( | 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.
USER 11 if the resulting new length of this descriptor is greater than its maximum length.
Parameters | |
---|---|
aDes | A 16-bit non modifiable descriptor whose data is to be appended. |
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content.
USER 11 if the resulting new length of this descriptor is greater than its maximum length. USER 17 if aLength is negative.
Parameters | |
---|---|
aBuf | A pointer to the data to be copied. |
aLength | The length of data to be copied. |
IMPORT_C void | Append2 | ( | TChar | aChar | ) |
The surrogate aware version of Append().
Appends data onto the end of this descriptor's data.
The length of this descriptor is incremented to reflect the new content. The length will be increased by 1 if aChar is inside BMP or 2 if aChar is outside BMP.
USER 11 if the resulting new length of this descriptor is greater than its maximum length.
USER 217 if corrupt surrogate found in aChar. This functions will not validate already existing surrogate in the descriptor.
See also: TDes16::Append()
Parameters | |
---|---|
aChar | A single character to be appended. Can be inside or outside BMP. |
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.
USER 11 if aLength is negative, or the resulting length of this descriptor is greater than its maximum length.
Parameters | |
---|---|
aChar | The fill character. |
aLength | The number of fill characters to be appended. |
The surrogate aware version of AppendFill().
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.
If aChar is supplementary character, and available space to fill is odd in 16-bit unit, then the last 16-bit unit will be filled with high surrogate.
USER 11 if aLength is negative, or the resulting length of this descriptor is greater than its maximum length.
USER 217 if corrupt surrogate found in aChar. These functions will not validate already existing surrogate in the descriptor.
See also: TDes16::AppendFill()
Parameters | |
---|---|
aChar | The fill character. Can be inside or outside BMP. |
aLength | The length of additional space to append into. |
IMPORT_C void | AppendFormat | ( | TRefByValue< const TDesC16 > | aFmt, |
TDes16Overflow * | aOverflowHandler, | |||
... | ||||
) |
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. If it results in the length of this descriptor exceeding its maximum length, then the function:
1. calls the Overflow() member function of the overflow handler, if an overflow handler is supplied 2 raises a USER 11 panic, if no overflow handler is supplied.
As much literal text as possible will have been copied into this descriptor and this descriptor will have reached its maximum length.
Text converted from a trailing argument is appended as a complete string. If an attempt to append this string fails because the resulting length of this descriptor would exceed its maximum length, then the function:
1. calls the Overflow() member function of the overflow handler, if an overflow handler is supplied
2 raises a USER 11 panic, if no overflow handler is supplied.
None of the generated text is appended and length of this descriptor may be less than the maximum.
USER 11 if the length of the descriptor exceeds its maximum length and no overflow handler has been supplied. USER 12 if the format string has incorrect syntax.
See also: TDes16::Format() TDes16Overflow::Overflow()
Parameters | |
---|---|
aFmt | The 16-bit non-modifiable descriptor containing the format string. The TRefByValue class provides a constructor which takes a TDesC16 type. |
aOverflowHandler | A pointer to the overflow handler. |
IMPORT_C void | AppendFormat | ( | 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.
Text converted from a trailing argument is appended as a complete string.
USER 11 if the resulting length of text in this descriptor exceeds the descriptor's maximum length. USER 12 if the format string has incorrect syntax.
See also: TDes16::Format()
Parameters | |
---|---|
aFmt | The 16-bit non-modifiable descriptor containing the format string. The TRefByValue class provides a constructor which takes a TDesC16 type. |
IMPORT_C void | AppendFormatList | ( | const TDesC16 & | aFmt, |
VA_LIST | aList, | |||
TDes16Overflow * | aOverflowHandler = NULL | |||
) |
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 AppendFormat(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.
See also: TDes16::AppendFormat VA_LIST
Parameters | |
---|---|
aFmt | The descriptor containing the format string. |
aList | A pointer to an argument list. |
aOverflowHandler | If supplied, a pointer to the overflow handler. |
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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
Parameters | |
---|---|
Des | 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). |
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. |
anAlignment | The alignment of the data within the target area. |
aFill | The fill character used to pad the target area. |
IMPORT_C void | AppendJustify | ( | 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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
Parameters | |
---|---|
Des | An 8-bit non-modifiable descriptor containing the source data. |
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. |
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. |
anAlignment | The alignment of the data within the target area. |
aFill | The fill character used to pad the target area. |
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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
Parameters | |
---|---|
aString | 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). |
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). |
anAlignment | The alignment of the data within the target area. |
aFill | The fill character used to pad the target area. |
IMPORT_C void | AppendJustify | ( | 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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
USER 17 if aLength is negative.
Parameters | |
---|---|
aString | A pointer to a source memory location. |
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. |
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. |
anAlignment | The alignment of the data within the target area. |
aFill | The fill character used to pad the target area. |
The surrogate aware version of AppendJustify.
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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
USER 217 if corrupt surrogate found in the parameters or in the descriptor.
See also: TDes16::AppendJustify()
Parameters | |
---|---|
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). |
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. |
anAlignment | The alignment of the data within the target area. |
aFill | The fill character used to pad the target area. Can be inside or outside BMP. |
IMPORT_C void | AppendJustify2 | ( | const TDesC16 & | aDes, |
TInt | aLength, | |||
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
The surrogate aware version of AppendJustify.
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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
USER 217 if corrupt surrogate found in the parameters or in the descriptor.
See also: TDes16::AppendJustify()
Parameters | |
---|---|
aDes | An 8-bit non-modifiable descriptor containing the source data. |
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. |
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. |
anAlignment | The alignment of the data within the target area. |
aFill | The fill character used to pad the target area. Can be inside or outside BMP. |
The surrogate aware version of AppendJustify.
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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
USER 217 if corrupt surrogate found in the parameters or in the descriptor.
See also: TDes16::AppendJustify()
Parameters | |
---|---|
aString | 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). |
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). |
anAlignment | The alignment of the data within the target area. |
aFill | The fill character used to pad the target area. Can be inside or outside BMP. |
IMPORT_C void | AppendJustify2 | ( | const TUint16 * | aString, |
TInt | aLength, | |||
TInt | aWidth, | |||
TAlign | anAlignment, | |||
TChar | aFill | |||
) |
The surrogate aware version of AppendJustify.
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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
USER 17 if aLength is negative.
USER 217 if corrupt surrogate found in the parameters or in the descriptor.
See also: TDes16::AppendJustify()
Parameters | |
---|---|
aString | A pointer to a source memory location. |
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. |
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. |
anAlignment | The alignment of the data within the target area. |
aFill | The fill character used to pad the target area. Can be inside or outside BMP. |
IMPORT_C TInt | AppendNum | ( | 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.
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 two most common are: 4.1 the maximum number of characters necessary to represent the number, as defined in the TRealFormat object, is greater than the maximum length of this descriptor 4.2 the character representation format (i.e. the format type), as defined in the TRealFormat object is not recognised
Parameters | |
---|---|
aVal | The floating point number to be converted. |
aFormat | The format of the conversion. |
IMPORT_C void | AppendNum | ( | 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.
Parameters | |
---|---|
aVal | The 64-bit signed integer value. |
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.
Parameters | |
---|---|
aVal | The 64 bit integer value. This is always treated as an unsigned value. |
aRadix | The number system representation for the 64 bit integer. |
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.
Parameters | |
---|---|
aVal | The unsigned integer value. |
aRadix | The number system representation for the unsigned integer. |
aWidth | The number of characters to be used to contain the conversion, and to be appended to this descriptor. |
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.
Parameters | |
---|---|
aVal | The unsigned integer value. |
aRadix | The number system representation for the unsigned integer. |
aWidth | The number of characters: to be used to contain the conversion, to be appended to this descriptor. |
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.
Parameters | |
---|---|
aVal | The 64 bit integer value. This is always treated as an unsigned value. |
aRadix | The number system representation for the 64 bit integer. If no explicit value is specified, then EDecimal is the default. |
IMPORT_C void | Capitalize | ( | ) |
Capitalises the content of this descriptor.
Capitalisation is implemented as appropriate to the current locale.
IMPORT_C void | Capitalize2 | ( | ) |
The surrogate aware version of Capitalize().
Capitalises the content of this descriptor.
Capitalisation is implemented as appropriate to the current locale.
USER 217 if corrupt surrogate found in the descriptor.
See also: TDes16::Capitalize()
IMPORT_C TPtr8 | Collapse | ( | ) |
Collapse all characters from 16 to 8 bits
IMPORT_C void | Collate2 | ( | ) |
The surrogate aware version of Collate().
Performs collation on the content of this descriptor.
USER 217 if corrupt surrogate found in the descriptor.
See also: TDes16::Collate()
IMPORT_C void | Copy | ( | const TDesC8 & | aDes | ) |
Copies data into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
USER 11 if the length of aDes is greater than the maximum length of this (target) descriptor.
Parameters | |
---|---|
aDes | An 8 bit non modifiable descriptor. |
IMPORT_C void | Copy | ( | const TDesC16 & | aDes | ) |
Copies data into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
USER 11 if the length of aDes is greater than the maximum length of this (target) descriptor.
Parameters | |
---|---|
aDes | A 16-bit non modifiable descriptor. |
Copies data into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
USER 11 if aLength is negative or is greater than maximum length of this (target) descriptor.
Parameters | |
---|---|
aBuf | The start address of data to be copied. |
aLength | The length of data to be copied. |
IMPORT_C void | Copy | ( | const TUint16 * | aString | ) |
Copies data into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
USER 11 if the length of aString, excluding the zero terminator, is greater than the maximum length of this (target) descriptor.
Parameters | |
---|---|
aString | A pointer to a zero-terminated string. |
IMPORT_C void | CopyC | ( | 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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
Parameters | |
---|---|
aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyC2 | ( | const TDesC16 & | aDes | ) |
The surrogate aware version of CopyC().
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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
USER 217 if corrupt surrogate found in aDes or in the descriptor.
See also: TDes16::CopyC()
Parameters | |
---|---|
aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyCP | ( | 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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
Parameters | |
---|---|
aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyCP2 | ( | const TDesC16 & | aDes | ) |
The surrogate aware version of CopyCP().
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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
USER 217 if corrupt surrogate found in aDes or in the descriptor.
See also: TDes16::CopyCP()
Parameters | |
---|---|
aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyF | ( | 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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
Parameters | |
---|---|
aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyF2 | ( | const TDesC16 & | aDes | ) |
The surrogate aware version of CopyF().
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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
USER 217 if corrupt surrogate found in aDes or in the descriptor.
See also: TDes16::CopyF()
Parameters | |
---|---|
aDes | A 16-bit non-modifiable descriptor. |
IMPORT_C void | CopyLC | ( | 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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
Parameters | |
---|---|
aDes | A 16-bit non modifiable descriptor. |
IMPORT_C void | CopyLC2 | ( | const TDesC16 & | aDes | ) |
The surrogate aware version of CopyLC().
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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
USER 217 if corrupt surrogate found in aDes or in the descriptor.
See also: TDes16::CopyLC()
Parameters | |
---|---|
aDes | A 16-bit non modifiable descriptor. |
IMPORT_C void | CopyUC | ( | 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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
Parameters | |
---|---|
aDes | A 16-bit non modifiable descriptor. |
IMPORT_C void | CopyUC2 | ( | const TDesC16 & | aDes | ) |
The surrogate aware version of CopyUC().
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.
USER 11 if the length of aDes is greater than the maximum length of this target descriptor.
USER 217 if corrupt surrogate found in aDes or in the descriptor.
See also: TDes16::CopyUC()
Parameters | |
---|---|
aDes | A 16-bit non modifiable descriptor. |
Deletes data from this descriptor.
The length of this descriptor is changed to reflect the loss of data.
USER 10 if aPos is negative or is greater than the length of this descriptor.
Parameters | |
---|---|
aPos | The position within the data where deletion is to start. This is an offset value; a zero value refers to the leftmost data position. |
aLength | The length of data to be deleted. If necessary, the function adjusts this value to ensure that no data beyond the end of the descriptor data area is deleted. |
IMPORT_C void | Fill | ( | TChar | aChar | ) |
Fills the descriptor's data area with the specified character, replacing any existing data.
The descriptor is filled from the beginning up to its current length. The descriptor's length does not change. It is not filled to its maximum length.
Parameters | |
---|---|
aChar | The fill character. |
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.
USER 11 if aLength is negative or is greater than the maximum length of this descriptor.
Parameters | |
---|---|
aChar | The fill character. |
aLength | The new length of the descriptor and the number of fill characters to be copied into it. |
IMPORT_C void | Fill2 | ( | TChar | aChar | ) |
The surrogate aware version of Fill().
Fills the descriptor's data area with the specified character, replacing any existing data.
The descriptor is filled from the beginning up to its current length. The descriptor's length does not change. It is not filled to its maximum length. If aChar is supplementary character, and available space to fill is odd in 16-bit unit, then the last 16-bit unit will be filled with high surrogate, and the length will keep unchanged.
See also: TDes16::Fill()
Parameters | |
---|---|
aChar | The fill character. Can be inside or outside BMP. |
The surrogate aware version of Fill().
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.
If aChar is supplementary character, and available space to fill is odd in 16-bit unit, then the last 16-bit unit will be left unchanged.
USER 11 if aLength is negative or is greater than the maximum length of this descriptor.
USER 217 if corrupt surrogate found in aChar. These functions will not validate already existing surrogate in the descriptor.
See also: TDes16::Fill()
Parameters | |
---|---|
aChar | The fill character. Can be inside or outside BMP. |
aLength | The new length of the descriptor. |
IMPORT_C void | FillZ | ( | ) |
Fills the descriptor's data area with binary zeroes, i.e.0x0000, replacing any existing data.
The descriptor is filled from the beginning up to its current length. The descriptor's length does not change. It is not filled to its maximum length.
IMPORT_C void | FillZ | ( | 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.
USER 11 if aLength is negative, or is greater than the maximum length of this descriptor.
Parameters | |
---|---|
aLength | The new length of the descriptor and the number of binary zeroes to be copied into it. |
IMPORT_C void | Fold | ( | ) |
Performs folding on the content of this descriptor.
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.
IMPORT_C void | Fold2 | ( | ) |
The surrogate aware version of Fold().
Performs folding on the content of this descriptor.
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.
USER 217 if corrupt surrogate found in the descriptor.
See also: TDes16::Fold()
IMPORT_C void | Format | ( | 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
USER 11 if the resulting length of text in this descriptor exceeds the descriptor's maximum length. USER 12 if the format string has incorrect syntax.
See also: TDes16::Num() TDes16::NumUC()
Parameters | |
---|---|
aFmt | The descriptor containing the format string. The TRefByValue class provides a constructor which takes a TDesC8 type. |
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 Format(). In practice, it is better and easier to use Format(), passing a variable number of arguments as required by the format string.
See also: TDes16::Format() VA_LIST
Parameters | |
---|---|
aFmt | The descriptor containing the format string. |
aList | A pointer to an argument list. |
Inserts data into this descriptor.
The length of this descriptor is changed to reflect the extra data.
USER 10 if aPos is negative or is greater than the length of this descriptor. USER 11 if the resulting length of this descriptor is greater than its maximum length.
Parameters | |
---|---|
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. |
aDes | A 16-bit non modifiable descriptor whose data is to be inserted. |
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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
Parameters | |
---|---|
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). |
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. |
anAlignment | The alignment of the data within the target area |
aFill | The fill character used to pad the target area. |
The surrogate aware version of Justify().
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.
USER 11 if the resulting length of this descriptor is greater than its maximum length or aWidth has a negative value other than KDefaultJustifyWidth.
USER 217 if corrupt surrogate found in the parameters or in the descriptor.
See also: TDes16::Justify()
Parameters | |
---|---|
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). |
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. |
anAlignment | The alignment of the data within the target area |
aFill | The fill character used to pad the target area. Can be inside or outside BMP. |
Extracts the leftmost part of the data.
The function does not cut or remove any data but constructs a modifiable pointer descriptor to represent the leftmost part of the data.
USER 10 if aLength is negative.
Parameters | |
---|---|
aLength | The length of the data to be extracted. If this value is greater than the length of the descriptor, the function extracts the whole of the descriptor. |
IMPORT_C void | LowerCase | ( | ) |
Converts the content of this descriptor to lower case.
Conversion is implemented as appropriate to the current locale.
IMPORT_C void | LowerCase2 | ( | ) |
The surrogate aware version of LowerCase().
Converts the content of this descriptor to lower case.
Conversion is implemented as appropriate to the current locale.
USER 217 if corrupt surrogate found in the descriptor.
See also: TDes16::LowerCase()
TInt | MaxLength | ( | ) | const [inline] |
Gets the maximum length of the descriptor.
This is the upper limit for the number of 16-bit values or data items that the descriptor can represent.
TInt | MaxSize | ( | ) | const [inline] |
Gets the maximum size of the descriptor.
This is the upper limit for the number of bytes which the data represented by the descriptor can occupy.
Extracts a portion of the data.
The function does not cut or remove any data but constructs a modifiable pointer descriptor to represent the defined portion.
The portion is identified by its starting position and by the length of the remainder of the data starting from the specified position.
USER 10 if aPos is negative or aPos is greater than the length of the descriptor.
Parameters | |
---|---|
aPos | The starting position of the data to be extracted. This is an offset value; a zero value refers to the leftmost data position. |
Extracts a portion of the data.
The function does not cut or remove any data but constructs a modifiable pointer descriptor to represent the defined portion.
The portion is identified by its starting position and by its length.
USER 10 if aPos is negative or aPos plus aLength is greater than the length of the descriptor.
Parameters | |
---|---|
aPos | The starting position of the data to be extracted. This is an offset value; a zero value refers to the leftmost data position. |
aLength | The length of data to be extracted. |
IMPORT_C TInt | Num | ( | 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.
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 two most common are: 4.1 the maximum number of characters necessary to represent the number, as defined in the TRealFormat object, is greater than the maximum length of this descriptor 4.2 the character representation format (i.e. the format type), as defined in the TRealFormat object is not recognised.
See also: TRealFormat::iType
Parameters | |
---|---|
aVal | The floating point number to be converted. |
aFormat | The format of the conversion. |
IMPORT_C void | Num | ( | 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.
Parameters | |
---|---|
aVal | The 64-bit signed integer value. |
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.
Parameters | |
---|---|
aVal | The 64 bit integer value. This is treated as an unsigned value for all builds. |
aRadix | The number system representation for the 64 bit integer. |
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.
Parameters | |
---|---|
aVal | The unsigned integer value. |
aRadix | The number system representation for the unsigned integer. |
aWidth | The number of characters: to be used to contain the conversion, to be copied into this descriptor. |
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.
See also: TDes16::Format()
Parameters | |
---|---|
aVal | The unsigned integer value. |
aRadix | The number system representation for the unsigned integer. |
aWidth | The number of characters: to be used to contain the conversion, to be copied into this descriptor. |
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.
Parameters | |
---|---|
aVal | The 64 bit integer value. This is always treated as an unsigned value for all builds. |
aRadix | The number system representation for the 64 bit integer. If no explicit value is specified, then EDecimal is the default. |
IMPORT_C const TUint16 * | PtrZ | ( | ) |
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. It must be strictly less than the descriptor's maximum length. This condition guarantees that there is sufficient space for the zero terminator.
USER 11 if the descriptor's length is not strictly less than its maximum length.
IMPORT_C void | Repeat | ( | const TDesC16 & | aDes | ) |
Copies data with repetition into this descriptor, from another descriptor, replacing any existing data.
Copying proceeds until this descriptor is filled up to its current length. If it cannot contain a whole number of copies of the source data, then the last copy is truncated.
Parameters | |
---|---|
aDes | A 16-bit non modifiable descriptor whose data is to be repeatedly copied. |
Copies data with repetition into this descriptor, from a memory location specified by pointer, replacing any existing data.
Copying proceeds until this descriptor is filled up to its current length. If it cannot contain a whole number of copies of the source data, then the last copy is truncated.
USER 17 if aLength is negative.
Parameters | |
---|---|
aBuf | A pointer to data to be repeatedly copied. |
aLength | The length of data to be copied. |
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.
USER 8 if aLength is negative or the sum of aLength and aPos is greater than the length of this descriptor.
USER 10 if aPos is negative or is greater than the length of this descriptor.
USER 11 if the resulting length of this descriptor is greater than its maximum length.
USER 16 if the length of the source descriptor aDes is negative or is greater than the maximum length of this target descriptor,
Parameters | |
---|---|
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. |
aLength | The length of data to be replaced. |
aDes | The source 16-bit non modifiable descriptor whose data is to replace the target descriptor's data at aPos. |
Extracts the rightmost part of the data.
The function does not cut or remove any data but constructs a modifiable pointer descriptor to represent the rightmost part of the data.
USER 10 if aLength is negative.
Parameters | |
---|---|
aLength | The length of data to be extracted. If this value is greater than the length of the descriptor, the function extracts the whole of the descriptor. |
IMPORT_C void | SetLength | ( | TInt | aLength | ) |
Sets the length of the data represented by the descriptor to the specified value.
USER 11 if aLength is negative or is greater than the maximum length of this (target) descriptor.
Parameters | |
---|---|
aLength | The new length of the descriptor. |
IMPORT_C void | SetMax | ( | ) |
Sets the length of the data to the maximum length of the descriptor.
IMPORT_C void | Swap | ( | 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 either descriptor is smaller than the length of the other descriptor, then the function raises a USER 11 panic.
USER 11 if the maximum length of either descriptor is smaller than the length of the other descriptor.
Parameters | |
---|---|
aDes | The 16-bit modifiable descriptor whose data is to be swapped with the data of this descriptor. |
IMPORT_C void | Trim | ( | ) |
Deletes leading and trailing whitespace characters from the descriptor's data.
The length of the descriptor is reduced to reflect the loss of the whitespace characters.
See also: TDes16::TrimLeft() TDes16::TrimRight()
IMPORT_C void | TrimAll | ( | ) |
Deletes leading and trailing whitespace characters from the descriptor's data and replaces each contiguous set of whitespace characters within the data by one whitespace character.
The length of the descriptor is reduced to reflect the loss of the whitespace characters.
See also: TDes16::Trim()
IMPORT_C void | TrimLeft | ( | ) |
Deletes leading whitespace characters from the descriptor's data.
All whitespace characters up to, but not including the first non-whitespace character, are deleted.
The length of the descriptor is reduced to reflect the loss of the whitespace characters.
IMPORT_C void | TrimRight | ( | ) |
Deletes trailing whitespace characters from the descriptor's data.
The process starts on the right hand side of the descriptor's data and proceeds to the left.
All whitespace characters up to, but not including the first non-whitespace character, are deleted.
The length of the descriptor is reduced to reflect the loss of the whitespace characters.
IMPORT_C void | UpperCase | ( | ) |
Converts the content of this descriptor to upper case.
Conversion is implemented as appropriate to the current locale.
IMPORT_C void | UpperCase2 | ( | ) |
The surrogate aware version of UpperCase().
Converts the content of this descriptor to upper case.
Conversion is implemented as appropriate to the current locale.
USER 217 if corrupt surrogate found in the descriptor.
See also: TDes16::UpperCase()
TUint16 * | WPtr | ( | ) | const [protected, inline] |
IMPORT_C void | ZeroTerminate | ( | ) |
Appends a zero terminator onto the end of this descriptor's data.
The length of the descriptor is not changed. It must, however, be strictly less than the descriptor's maximum length. This condition guarantees that there is sufficient space for the zero terminator.
USER 11 if the descriptor's length is not strictly less than its maximum length.
Appends data onto the end of this descriptor's data and returns a reference to this descriptor.
The length of this descriptor is incremented to reflect the new content.
Parameters | |
---|---|
aDes | A 16-bit non-modifiable descriptor whose data is to be appended. |
Panic Codes | |
---|---|
USER | 11, if the resulting length of this descriptor is greater than its maximum length. |
Copies data into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
Parameters | |
---|---|
aString | A pointer to a zero-terminated string. |
Panic Codes | |
---|---|
USER | 11, if the length of the string, excluding the zero terminator, is greater than the maximum length of this (target) descriptor. |
Copies data into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
Parameters | |
---|---|
aDes | A 16-bit non-modifiable descriptor. |
Panic Codes | |
---|---|
USER | 11, if the length of the descriptor aDes is greater than the maximum length of this (target) descriptor. |
Copies data into this descriptor replacing any existing data.
The length of this descriptor is set to reflect the new data.
Parameters | |
---|---|
aDes | A 16-bit modifiable descriptor. |
Panic Codes | |
---|---|
USER | 11, if the length of the descriptor aDes is greater than the maximum length of this (target) descriptor. |
Reimplemented from TDesC16::operator[](TInt)const
Gets a const reference to a single data item within this descriptor's data.
Parameters | |
---|---|
anIndex | The position the data item within this descriptor's data. This is an offset value; a zero value refers to the leftmost data position. |
Panic Codes | |
---|---|
USER | 9, if anIndex is negative or is greater than or equal to the current length of this descriptor. |
Gets a non-const reference to a single data item within this descriptor's data.
Parameters | |
---|---|
anIndex | The position of the data item within this descriptor's data. This is an offset value; a zero value refers to the leftmost data position. |
Panic Codes | |
---|---|
USER | 9, if anIndex is negative or is greater than or equal to the current length of this descriptor. |