Split string
#4

pawn Код:
MultiLineString(string[], charactersPerLine = 30, separator[5] = "~n~")
{
    for(new i = charactersPerLine, len = strlen(string); i + 30 < len; i += 30)
    {
        strins(string, separator, i);
    }

    return string;
}
Untested.

Use:

pawn Код:
GameTextForAll(MultiLineString("hi my name is bob and i ride a little pony whos name is my little pony and i like making love to it"), 3000, 5);
Reply


Messages In This Thread
Split string - by SnG.Scot_MisCuDI - 29.07.2012, 23:35
Re: Split string - by Kindred - 29.07.2012, 23:39
Re: Split string - by Vince - 30.07.2012, 00:06
Re: Split string - by SuperViper - 30.07.2012, 02:56

Forum Jump:


Users browsing this thread: 1 Guest(s)