Hi all,
In my code below, I'm trying to re-write a string and convert and http text into actual web links.
It doesn't seem to be working and I think the problem may be that I'm rewriting the string and inserting another http string into the original string which then causes problems with the loop.
Can anyone get this to work please.
Regards
Melt
int startindex = 0;
int endindex = 0;
int lengthurl = 0;
string url = string.Empty;
string tweet = "here http://bit.ly/i9pork or http://bit.ly/eNWP2E";
while (tweet.IndexOf("http", startindex) != -1)
{
startindex = tweet.IndexOf("http", startindex);
endindex = tweet.IndexOf(" ", startindex);
if (endindex == -1)
{
endindex = tweet.Length;
}
l ...
Go to the complete details ...