Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsAbAutoCompleteSearchString Class Reference

#include <nsAbAutoCompleteSession.h>

List of all members.

Public Member Functions

 nsAbAutoCompleteSearchString (const PRUnichar *uSearchString)
virtual ~nsAbAutoCompleteSearchString ()

Public Attributes

const PRUnicharmFullString
PRUint32 mFullStringLen
const PRUnicharmFirstPart
PRUint32 mFirstPartLen
const PRUnicharmSecondPart
PRUint32 mSecondPartLen

Detailed Description

Definition at line 60 of file nsAbAutoCompleteSession.h.


Constructor & Destructor Documentation

Definition at line 787 of file nsAbAutoCompleteSession.cpp.

{
  mFullString = nsCRT::strdup(uSearchString);
  mFullStringLen = nsCRT::strlen(mFullString);
  
  PRUint32 i;
  PRUnichar * aPtr;
  for (i = 0, aPtr = (PRUnichar*)mFullString; i < mFullStringLen; i ++, aPtr ++)
  {
    if (*aPtr == ' ')
    {
      mFirstPart = nsCRT::strndup(mFullString, i);
      mFirstPartLen = i;
      mSecondPart = nsCRT::strdup(++aPtr);
      mSecondPartLen = mFullStringLen - i - 1;
      return;
    }
  }
  
  /* If we did not find a space in the search string, initialize the first and second part as null */
  mFirstPart = nsnull;
  mFirstPartLen = 0;
  mSecondPart = nsnull;
  mSecondPartLen = 0;
}

Member Data Documentation

Definition at line 69 of file nsAbAutoCompleteSession.h.

Definition at line 70 of file nsAbAutoCompleteSession.h.

Definition at line 66 of file nsAbAutoCompleteSession.h.

Definition at line 67 of file nsAbAutoCompleteSession.h.

Definition at line 72 of file nsAbAutoCompleteSession.h.

Definition at line 73 of file nsAbAutoCompleteSession.h.


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