Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <inetprottextutils.h>
Link against: inetprotutil.lib

Class InetProtTextUtils

class InetProtTextUtils;

Description

Comments :

Members

Defined in InetProtTextUtils:


Member functions


RemoveWhiteSpace(TPtrC8 &,TRemoveMode)

IMPORT_C static TInt RemoveWhiteSpace(TPtrC8 &aData, TRemoveMode aMode);

Description

Removes any contiguous whitespace at the extremes of the data, as specified by aMode. Whitespace is defined by the functions TChar::IsSpace()const - white space includes spaces, tabs, and separators (e.g. new line).

Parameters

TPtrC8 &aData

A descriptor pointer with the data.

InetProtTextUtils::TRemoveMode aMode

The specified removal mode.

Return value

TInt

The number of consumed whitespace characters. If the data is empty or the data is all whitespace the error code KUriUtilsErrEmptyData is returned.


RemoveWhiteSpace(TPtrC16 &,TRemoveMode)

IMPORT_C static TInt RemoveWhiteSpace(TPtrC16 &aData, TRemoveMode aMode);

Description

Removes any contiguous whitespace at the extremes of the data, as specified by aMode. Whitespace is defined by the functions TChar::IsSpace()const - white space includes spaces, tabs, and separators (e.g. new line).

Parameters

TPtrC16 &aData

A descriptor pointer with the data.

InetProtTextUtils::TRemoveMode aMode

The specified removal mode.

Return value

TInt

The number of consumed whitespace characters. If the data is empty or the data is all whitespace the error code KUriUtilsErrEmptyData is returned.


ConvertIntToDescriptorL(TInt,HBufC8 *&)

IMPORT_C static void ConvertIntToDescriptorL(TInt aInt, HBufC8 *&aBuffer);

Description

Converts an integer value into its decimal character representation.

Parameters

TInt aInt

An integer value.

HBufC8 *&aBuffer

An output argument of a pointer to a data buffer that will contain the character representation of the integer value.


ConvertIntToDescriptorL(TInt,HBufC16 *&)

IMPORT_C static void ConvertIntToDescriptorL(TInt aInt, HBufC16 *&aBuffer);

Description

Converts an integer value into its decimal character representation.

Parameters

TInt aInt

An integer value.

HBufC16 *&aBuffer

An output argument of a pointer to a data buffer that will contain the character representation of the integer value.


ConvertDescriptorToInt(const TDesC8 &,TInt &)

IMPORT_C static TInt ConvertDescriptorToInt(const TDesC8 &aData, TInt &aInt);

Description

Converts the character representation of an integer into its numeric value. Preceeding whitespace is ignored and the integer is delimited by either the end of the data, whitespace or any other character other than 0 to 9.

Parameters

const TDesC8 &aData

A descriptor pointer with the data.

TInt &aInt

An output argument in which the numeric value of the data is placed.

Return value

TInt

The number of consumed characters that contributed to the integer value, including any whitespace before the integer. If the data is empty the error code KUriUtilsErrEmptyData is returned. If there are no digits at the beginning of the data the error code KUriUtilsErrNoIntergerInData is returned.


ConvertDescriptorToInt(const TDesC16 &,TInt &)

IMPORT_C static TInt ConvertDescriptorToInt(const TDesC16 &aData, TInt &aInt);

Description

Converts the character representation of an integer into its numeric value. Preceeding whitespace is ignored and the integer is delimited by either the end of the data, whitespace or any other character other than 0 to 9.

Parameters

const TDesC16 &aData

A descriptor pointer with the data.

TInt &aInt

An output argument in which the numeric value of the data is placed.

Return value

TInt

The number of consumed characters that contributed to the integer value, including any whitespace before the integer. If the data is empty the error code KUriUtilsErrEmptyData is returned. If there are no digits at the beginning of the data the error code KUriUtilsErrNoIntergerInData is returned.


ExtractNextTokenFromList(TPtrC8 &,TPtrC8 &,TChar)

IMPORT_C static TInt ExtractNextTokenFromList(TPtrC8 &aBuffer, TPtrC8 &aToken, TChar aSeparator);

Description

Extract a token from the head of the supplied buffer, which is assumed to be a token-list. The tokens are separated by the specified character. Any white space surrounding the token is stripped out. The number of characters consumed from the buffer are returned. The buffer is updated to not include the extracted token including the separator.

Parameters

TPtrC8 &aBuffer

The buffer containing the token-list.

TPtrC8 &aToken

An output argument containing the extracted token.

TChar aSeparator

The separator character.

Return value

TInt

The number of characters consumed from the buffer.


ExtractNextTokenFromList(TPtrC16 &,TPtrC16 &,TChar)

IMPORT_C static TInt ExtractNextTokenFromList(TPtrC16 &aBuffer, TPtrC16 &aToken, TChar aSeparator);

Description

Extract a token from the head of the supplied buffer, which is assumed to be a token-list. The tokens are separated by the specified character. Any white space surrounding the token is stripped out. The number of characters consumed from the buffer are returned. The buffer is updated to not include the extracted token including the separator.

Parameters

TPtrC16 &aBuffer

The buffer containing the token-list.

TPtrC16 &aToken

An output argument containing the extracted token.

TChar aSeparator

The separator character.

Return value

TInt

The number of characters consumed from the buffer.


ExtractNextTokenFromList(TPtrC8 &,TPtrC8 &,const TDesC8 &)

IMPORT_C static TInt ExtractNextTokenFromList(TPtrC8 &aBuffer, TPtrC8 &aToken, const TDesC8 &aSeparators);

Description

Extract a token from the head of the supplied buffer, which is assumed to be a token-list. The tokens are separated by one of the specified characters. Any white space surrounding the token is stripped out. The number of characters consumed from the buffer are returned. The buffer is updated to not include the extracted token including the separator.

Parameters

TPtrC8 &aBuffer

The buffer containing the token-list.

TPtrC8 &aToken

An output argument containing the extracted token.

const TDesC8 &aSeparators

The list of separator characters.

Return value

TInt

The number of characters consumed from the buffer.


ExtractNextTokenFromList(TPtrC16 &,TPtrC16 &,const TDesC16 &)

IMPORT_C static TInt ExtractNextTokenFromList(TPtrC16 &aBuffer, TPtrC16 &aToken, const TDesC16 &aSeparators);

Description

Extract a token from the head of the supplied buffer, which is assumed to be a token-list. The tokens are separated by one of the specified characters. Any white space surrounding the token is stripped out. The number of characters consumed from the buffer are returned. The buffer is updated to not include the extracted token including the separator.

Parameters

TPtrC16 &aBuffer

The buffer containing the token-list.

TPtrC16 &aToken

An output argument containing the extracted token.

const TDesC16 &aSeparators

The list of separator characters.

Return value

TInt

The number of characters consumed from the buffer.


ExtractQuotedStringL(TPtrC8 &,TPtrC8 &)

IMPORT_C static TInt ExtractQuotedStringL(TPtrC8 &aBuffer, TPtrC8 &aQuotedString);

Description

Extract a quoted string value from the head of the supplied buffer. Anything outside the quotes is discarded and the quotes themselves are not included in the returned string.

Parameters

TPtrC8 &aBuffer

The buffer containing the quoted.

TPtrC8 &aQuotedString

An output argument containing the extracted string.

Return value

TInt

The number of characters consumed from the buffer.


ExtractQuotedStringL(TPtrC16 &,TPtrC16 &)

IMPORT_C static TInt ExtractQuotedStringL(TPtrC16 &aBuffer, TPtrC16 &aQuotedString);

Description

Extract a quoted string value from the head of the supplied buffer. Anything outside the quotes is discarded and the quotes themselves are not included in the returned string.

Parameters

TPtrC16 &aBuffer

The buffer containing the quoted.

TPtrC16 &aQuotedString

An output argument containing the extracted string.

Return value

TInt

The number of characters consumed from the buffer.

[Top]


Member enumerations


Enum TRemoveMode

TRemoveMode

Description

enum TRemoveMode Enum defining whitespace removal modes.

ERemoveLeft

Specifies removal any contiguous whitespace characters at the beginning of some data.

ERemoveRight

Specifies removal any contiguous whitespace characters at the end of some data.

ERemoveBoth

Specifies removal any contiguous whitespace characters at the beginning and end of some data.