Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Protected Attributes
CopyToUpperCase Class Reference

A character sink for copying with case conversion. More...

List of all members.

Public Types

typedef PRUnichar value_type
typedef char value_type

Public Member Functions

 CopyToUpperCase (nsAString::iterator &aDestIter)
PRUint32 write (const PRUnichar *aSource, PRUint32 aSourceLength)
 CopyToUpperCase (nsACString::iterator &aDestIter)
PRUint32 write (const char *aSource, PRUint32 aSourceLength)

Protected Attributes

nsAString::iterator & mIter
nsACString::iterator & mIter

Detailed Description

A character sink for copying with case conversion.

Definition at line 230 of file nsUnicharUtils.cpp.

Member Typedef Documentation

Definition at line 233 of file nsUnicharUtils.cpp.

Definition at line 669 of file nsReadableUtils.cpp.

Constructor & Destructor Documentation

CopyToUpperCase::CopyToUpperCase ( nsAString::iterator &  aDestIter) [inline]

Definition at line 235 of file nsUnicharUtils.cpp.

        : mIter(aDestIter)

Here is the call graph for this function:

CopyToUpperCase::CopyToUpperCase ( nsACString::iterator &  aDestIter) [inline]

Definition at line 671 of file nsReadableUtils.cpp.

        : mIter(aDestIter)

Member Function Documentation

PRUint32 CopyToUpperCase::write ( const PRUnichar aSource,
PRUint32  aSourceLength 
) [inline]

Definition at line 241 of file nsUnicharUtils.cpp.

          PRUint32 len = PR_MIN(PRUint32(mIter.size_forward()), aSourceLength);
          PRUnichar* dest = mIter.get();
          if (gCaseConv)
              gCaseConv->ToUpper(aSource, dest, len);
          else {
              NS_WARNING("No case converter: only copying");
              memcpy(dest, aSource, len * sizeof(*aSource));
          return len;

Here is the call graph for this function:

PRUint32 CopyToUpperCase::write ( const char *  aSource,
PRUint32  aSourceLength 
) [inline]

Definition at line 677 of file nsReadableUtils.cpp.

          PRUint32 len = PR_MIN(PRUint32(mIter.size_forward()), aSourceLength);
          char* cp = mIter.get();
          const char* end = aSource + len;
          while (aSource != end) {
            char ch = *aSource;
            if ((ch >= 'a') && (ch <= 'z'))
              *cp = ch - ('a' - 'A');
              *cp = ch;
          return len;

Member Data Documentation

nsAString::iterator& CopyToUpperCase::mIter [protected]

Definition at line 256 of file nsUnicharUtils.cpp.

nsACString::iterator& CopyToUpperCase::mIter [protected]

Definition at line 696 of file nsReadableUtils.cpp.

The documentation for this class was generated from the following files: