struct PbkEngUtils |
Private Member Functions | |
---|---|
PbkEngUtils () |
Public Member Type Definitions | |
---|---|
typedef | TBool (* TIsWordSeparator |
IMPORT_C HBufC * | AllocL | ( | HBufC * | aBuffer, |
TInt | aMaxLength | |||
) | [static] |
Allocates or reallocates aBuffer to be able to hold at least aMaxLength characters.
IMPORT_C TInt | AppendAndReplaceChars | ( | TDes & | aDest, |
const TDesC & | aSrc, | |||
const TDesC & | aCharsToReplace, | |||
const TDesC & | aReplaceChars | |||
) | [static] |
Appends a descriptor to another and replaces characters while appending.
IMPORT_C void | AppendGraphicCharacters | ( | TDes & | aDest, |
const TDesC & | aSrc, | |||
TText | aChar | |||
) | [static] |
Appends all graphic characters ( TChar::IsGraph() ) in a string to another string. Non-graphic characters are replaced with a specified character.
IMPORT_C MDesCArray * | BreakInWordsLC | ( | const TDesC & | aText, |
TIsWordSeparator | aWordSeparatorFunc = NULL | |||
) | [static] |
Breaks text into words array.
const TDesC & aText | text to break into words. |
TIsWordSeparator aWordSeparatorFunc = NULL | function for detecting word separator characters. Default implementation uses TChar::IsSpace(). |
IMPORT_C TBool | ContainSameDigits | ( | const TDesC & | aNumText1, |
const TDesC & | aNumText2, | |||
TInt | aNumberOfDigits = 0 | |||
) | [static] |
Returns true if two descriptors contain the same digits in the same order. Skips all non-digit characters when doing the comparison.
if both descriptors are empty the result is true
if both descriptors contain no digits the result is true
if both descriptors contain digits, but the other less than aNumberOfDigits the result is false
if both descriptors contain digits, but the other less than aNumberOfDigits the result is false
if both descriptors contain the same digits in the same order the result is always true regardless of the value of aNumberOfDigits
IMPORT_C TInt | CopyDigitsFromEnd | ( | const TDesC & | aNumText, |
TInt | aNumberOfDigits, | |||
TDes & | aDigitsText | |||
) | [static] |
Copies specified number of digit characters (c is a digit if TChar(c).IsDigit() is true) from the end of a descriptor to another descriptor. Used in phone number matching.
IMPORT_C HBufC * | CopyL | ( | HBufC * | aBuffer, |
const TDesC & | aText, | |||
TInt | aMinBufLength = 0 | |||
) | [static] |
Copies aText into aBuffer. The buffer is reallocated if necessary.
IMPORT_C TInt | CountSpaces | ( | const TDesC & | aText | ) | [static] |
Returns the number of white space characters in aText.
const TDesC & aText |
IMPORT_C void | FindAndOpenDefaultResourceFileLC | ( | RFs & | aFs, |
RResourceFile & | aResFile | |||
) | [static] |
Searches and opens the DLL default resource file. Calls FindAndOpenResourceFileLC.
RFs & aFs | open file server handle. |
RResourceFile & aResFile | resource file to open. If open is succesful, resource file close operation is pushed on to the cleanup stack. |
IMPORT_C void | FindAndOpenResourceFileLC | ( | RFs & | aFs, |
const TDesC & | aResFileName, | |||
const TDesC & | aResFilePath, | |||
const TDesC & | aResFileDrive, | |||
RResourceFile & | aResFile | |||
) | [static] |
Searches and opens a resource file.
KErrNoMemory |
if out of memory. |
KErrNotFound |
if the resource file is not found. |
KErrBadName |
if an empty file name (with path) was supplied |
other |
error searching or opening the resource file. |
RFs & aFs | open file server handle. |
const TDesC & aResFileName | resource file name. |
const TDesC & aResFilePath | path to search the resource file from. |
const TDesC & aResFileDrive | Drive the resource file is on. |
RResourceFile & aResFile | resource file to open. If open is succesful, resource file close operation is pushed on to the cleanup stack. |
TBool | IsEmptyOrAllSpaces | ( | const TDesC & | aText | ) | [static, inline] |
Returns ETrue if aText is either empty or consists of only white space characters.
const TDesC & aText |
IMPORT_C void | ReplaceNonGraphicCharacters | ( | TDes & | aText, |
TText | aChar | |||
) | [static] |
Replaces all non-graphic characters (!TCharIsGraph()) in a string with the specified character.
IMPORT_C TInt | TrimAllAppend | ( | const TDesC & | aText, |
TDes & | aDest | |||
) | [static] |
Appends aText to aDest. Ignores all leading and trailing spaces in aText and converts consencutive space characters to a single space character.
IMPORT_C TInt | TrimAllLength | ( | const TDesC & | aText | ) | [static] |
Calculates and returns the trimmed length of aText. Ignores all leading and trailing spaces in aText and calculates consencutive space characters as a single character.
const TDesC & aText | the text whose trimmed length is to be calculated. |
IMPORT_C TInt | TrimRightAppend | ( | const TDesC & | aText, |
TDes & | aDest | |||
) | [static] |
Appends aText to aDest. Ignores all trailing spaces in aText and converts consencutive space characters to a single space character. Leading spaces remain unaffected.
IMPORT_C TInt | TrimRightLength | ( | const TDesC & | aText | ) | [static] |
Calculates and returns the trimmed length of aText. Ignores all trailing spaces in aText and calculates consencutive space characters as a single character. Leading spaces remain unaffected.
const TDesC & aText | the text whose trimmed length is to be calculated. |
typedef TBool (* | TIsWordSeparator |
Definition for a function that returns true if aChar is a word separator character. BreakInWordsL
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.