05.03.2012, 14:27
What do you mean with dynamically?
Here's the example you gave, but written with strmid
I haven't tested it, but the code should work.
Here's the example you gave, but written with strmid
pawn Код:
new sampletext[64] = "This is a sample text which will be splited into arrays";
new arrayofstr[2][128];
strmid(arrayofstr[0], sampletext, 0, 27); // Copy character range 0 - 27
strmid(arrayofstr[1], sampletext, 28, strlen(sampletext) - 1); // Copy character range 28 - end of string
printf("%s", arrayofstr[0]); // which will print out "This is a sample text which"