Text in string.
#7

Код:
stock SpaceChange(const text[])
{
	new modifiedstring[300];
	new len=strlen(text);
	if (len==0) return false;
 	new spacesfound = 0;
	for(new i=0;i<len;i++)
	{
		if(spacesfound == 5 || spacesfound == 10 || spacesfound == 15 || spacesfound == 20 || spacesfound == 25 || spacesfound == 30)
		{
			len = len+3;
			format(modifiedstring, sizeof(modifiedstring), "%slol", modifiedstring);
		}
		if(text[i] == ' ')
		{
			spacesfound++;
		}
		format(modifiedstring, sizeof(modifiedstring), "%s%s", modifiedstring, text[i]);
	}
	Console::Output("%s", modifiedstring);
	return modifiedstring;
}
I modified to this.. My code & you code does not work..

Eg.. i use SpaceChange("Test") & returned "Testeststt". I know, i dont make 5 space but i test it..
Reply


Messages In This Thread
Text in string. - by Logitech334 - 13.06.2010, 08:27
Re: Text in string. - by TheInnocentOne - 13.06.2010, 08:52
Re: Text in string. - by Logitech334 - 13.06.2010, 09:01
Re: Text in string. - by Cameltoe - 13.06.2010, 09:08
Re: Text in string. - by Logitech334 - 13.06.2010, 09:36
Re: Text in string. - by Dark_Kostas - 13.06.2010, 10:02
Re: Text in string. - by Logitech334 - 13.06.2010, 11:33
Re: Text in string. - by Dark_Kostas - 13.06.2010, 12:28
Re: Text in string. - by Nero_3D - 13.06.2010, 12:37
Re: Text in string. - by Logitech334 - 13.06.2010, 12:46

Forum Jump:


Users browsing this thread: 1 Guest(s)