24 lines
551 B
C#
24 lines
551 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Test_SearchAndFind
|
|
{
|
|
class Replace
|
|
{
|
|
public Replace()
|
|
{
|
|
|
|
}
|
|
|
|
Search search = new Search();
|
|
|
|
public string ReplaceString(string text, string searchString, string textBoxReplacementString, int currentCursorPosition)
|
|
{
|
|
return text.Remove(currentCursorPosition, searchString.Length).Insert(currentCursorPosition, textBoxReplacementString);
|
|
}
|
|
}
|
|
}
|