Condividi tramite


Declarations.IsCommitChar(String, Int32, Char) Method

Definition

Determines whether the specified character can be used to complete the specified text.

public:
 virtual bool IsCommitChar(System::String ^ textSoFar, int selected, char commitCharacter);
public:
 virtual bool IsCommitChar(Platform::String ^ textSoFar, int selected, char16 commitCharacter);
 virtual bool IsCommitChar(std::wstring const & textSoFar, int selected, char commitCharacter);
public virtual bool IsCommitChar (string textSoFar, int selected, char commitCharacter);
abstract member IsCommitChar : string * int * char -> bool
override this.IsCommitChar : string * int * char -> bool
Public Overridable Function IsCommitChar (textSoFar As String, selected As Integer, commitCharacter As Char) As Boolean

Parameters

textSoFar
String

[in] A string containing the text typed by the user.

selected
Int32

[in] The number of characters that are currently selected or -1 if nothing is selected.

commitCharacter
Char

[in] The character to determine is a completion character.

Returns

If the character is a commit character, returns true; otherwise, returns false.

Remarks

Typing a commit character causes the currently selected item in the completion list to be committed to the source file (through a call to the OnCommit method). This method determines if the character typed can be used to commit the text to the source file.

Text might be selected (for example, because of a previous auto-completion step) and that could change what is considered a commit character.

The base method returns true if the commit character is not a letter, numerical digit, or an underscore.

Applies to