nikhil
BAN USERclass Program
{
static void Main(string[] args)
{
string s = "HelloWorld HelloWorld";
string[] substring = { "el", "rl" };
Program nik = new Program();
StringBuilder nikhik = nik.bold(s, substring);
Console.WriteLine(nikhik);
Console.ReadLine();
}
public StringBuilder bold(string s, string[] sub)
{
List<int> indexes = new List<int>();
int index = 0;
int a = 0;
int b = 0;
int i = 0;
var builder = new StringBuilder();
while(i<=s.Length)
{
index = Convert.ToInt32(s.IndexOf(sub[0]));
if (index == -1)
{
builder = builder.Append(s);
break;
}
else
{
indexes.Add(index);
a = sub[0].Length;
b = sub[1].Length;
builder = builder.Append(s.Substring(i, index));
builder = builder.Append("<br>");
builder = builder.Append(sub[0]);
builder = builder.Append("</br>");
s = s.Substring(index + 2);
index = Convert.ToInt32(s.IndexOf(sub[1]));
builder = builder.Append(s.Substring(i, index));
builder = builder.Append("<br>");
builder = builder.Append(sub[1]);
builder = builder.Append("</br>");
s = s.Substring(index + 2);
// i = i + b;
s = s.Substring(i);
}
}
return builder;
}
}
RepShaneMMullen, SEO at IIT-D
Are you facing love life and married life problem. Contact vashikaran specialist right now. He will guide your solution with ...
RepAre you looking a solution for marry your love? Islamic dua to marry someone you love is the effective solution ...
RepMaryHDavis, Employee at ASU
Had a brief career promoting wooden tops in Salisbury, MD. My current pet project is lecturing about human hair in ...
RepPandit Ji is the best vashikaran expert for vashikaran mantra for girlfriend in Mumbai.It is the strongest method to ...
RepEdwards IVF Surrogate is one of the best & most successful provider of surrogate services.We provide moral, emotional, ethical and ...
RepDo you want to marry with your desired person? The Islamic dua for marriage with a loved one has great ...
}
- nikhil January 31, 2017