In This Article

DefaultWordBreakFinder Class

Provides the default implementation of an object that finds word breaks within an ITextSnapshot.

public class DefaultWordBreakFinder : IWordBreakFinder
Inheritance:
object object
Implements:
IWordBreakFinder

Remarks

Instances of this object can be registered with an ISyntaxLanguage using the RegisterService(object, object) method. Once an instance is registered with the language for the IWordBreakFinder interface type, its features can be used by the language.

Constructors

DefaultWordBreakFinder()

Initializes an instance of the class.

public DefaultWordBreakFinder()

Properties

DefaultWordContainsAdditionalCharacters

The default CharClass for the WordContainsAdditionalCharacters property.

public static CharClass DefaultWordContainsAdditionalCharacters { get; }

Property Value

CharClass

DefaultWordStandaloneCharacters

The default CharClass for the WordStandaloneCharacters property.

public static CharClass DefaultWordStandaloneCharacters { get; }

Property Value

CharClass

WordContainsAdditionalCharacters

The set of additional characters that can constitute the inside of a word, other than letters and digits.

public CharClass WordContainsAdditionalCharacters { get; set; }

Property Value

CharClass

Remarks

The default value is the _ character.

WordStandaloneCharacters

The set of characters that are intended to be single character words.

public CharClass WordStandaloneCharacters { get; set; }

Property Value

CharClass

Remarks

The default value is the set of .,()<>[]{}?!/:;'" characters.

Methods

FindCurrentWordEnd(TextSnapshotOffset)

Returns the ITextSnapshot offset of the word end character that occurs at or after the specified start offset.

public int FindCurrentWordEnd(TextSnapshotOffset snapshotOffset)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset from which to start parsing.

Returns

int

FindCurrentWordStart(TextSnapshotOffset)

Returns the ITextSnapshot offset of the word start character that occurs at or before the specified start offset.

public int FindCurrentWordStart(TextSnapshotOffset snapshotOffset)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset from which to start parsing.

Returns

int

FindNextWordStart(TextSnapshotOffset)

Returns the ITextSnapshot offset of the word start character that occurs after the specified start offset.

public int FindNextWordStart(TextSnapshotOffset snapshotOffset)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset from which to start parsing.

Returns

int

FindPreviousWordStart(TextSnapshotOffset)

Returns the ITextSnapshot offset of the word start character that occurs before the specified start offset.

public int FindPreviousWordStart(TextSnapshotOffset snapshotOffset)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset from which to start parsing.

Returns

int

Inherited Members

Extension Methods