Condividi tramite


IVsTextView.ReplaceTextOnLine(Int32, Int32, Int32, String, Int32) Method

Definition

Replaces line text.

public:
 int ReplaceTextOnLine(int iLine, int iStartCol, int iCharsToReplace, System::String ^ pszNewText, int iNewLen);
public:
 int ReplaceTextOnLine(int iLine, int iStartCol, int iCharsToReplace, Platform::String ^ pszNewText, int iNewLen);
int ReplaceTextOnLine(int iLine, int iStartCol, int iCharsToReplace, std::wstring const & pszNewText, int iNewLen);
public int ReplaceTextOnLine (int iLine, int iStartCol, int iCharsToReplace, string pszNewText, int iNewLen);
abstract member ReplaceTextOnLine : int * int * int * string * int -> int
Public Function ReplaceTextOnLine (iLine As Integer, iStartCol As Integer, iCharsToReplace As Integer, pszNewText As String, iNewLen As Integer) As Integer

Parameters

iLine
Int32

[in] Integer containing the line.

iStartCol
Int32

[in] Integer containing the starting column.

iCharsToReplace
Int32

[in] Integer containing the number of characters to replace.

pszNewText
String

[in] Pointer the new text being passed in.

iNewLen
Int32

[in] Length of the buffer (number of characters) being passed in.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextView::ReplaceTextOnLine(  
   [in] long iLine,  
   [in] CharIndex iStartCol,  
   [in] long iCharsToReplace,  
   [in] const WCHAR *pszNewText,  
   [in] long iNewLen  
);  

Applies to