WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsISemanticUnitScanner

IID:9f620be4-e535-11d6-b254-00039310a47a
Inherits From:nsISupports

Provides a language independent way to break UNICODE text into meaningful semantic units (e.g. words).

This interface is implemented by the following components:


Methods

PRBool next ( PRUnichar* text , PRInt32 length , PRInt32 pos , PRBool isLastBuffer , out PRInt32 begin , out PRInt32 end ) void start ( char* characterSet )

PRBool next ( PRUnichar* text , PRInt32 length , PRInt32 pos , PRBool isLastBuffer , out PRInt32 begin , out PRInt32 end )

Next() Get the begin / end offset of the next unit in the current text

Arguments:
text: the text to be scanned
length: the number of characters in the text to be processed
pos: the current position
isLastBuffer: , the buffer is the last one
begin: the end offset of the next unit
end
Returns:
has more unit in the current text

void start ( char* characterSet )

Start()

Starts up the semantic unit scanner with an optional character set, which acts as a hint to optimize the heuristics used to determine the language(s) of the processed text.

Arguments:
characterSet: the character set the text was originally encoded in (can be NULL)

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com