244 {
246 {
247 return NULL;
248 }
249
251
252 int pos_array_start = text.
IndexOf(
"{");
253 int pos_array_end = text.
IndexOf(
"}");
254
255 if ( pos_array_start > -1 && pos_array_end > -1 )
256 {
257 while ( true )
258 {
259 string array_value = text.
Substring(pos_array_start , pos_array_end - pos_array_start + 1 );
261
262 pos_array_start = text.
IndexOfFrom(pos_array_end,
"{");
263 pos_array_end = text.
IndexOfFrom(pos_array_start,
"}");
264
265 if ( pos_array_start == -1 )
266 {
267 break;
268 }
269 }
270 }
271 else
272 {
273 text.
Split(
",", ret);
274 }
275
276 return ret;
277 }
bool IsTextArray(string text)
proto native int Length()
Returns length of string.
proto void Insert(int index, string input)
Inserts a string into the n-th index, increasing the string length by the size of the input.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOfFrom(int start, string sample)
Finds 'sample' in 'str' from 'start' position. Returns -1 when not found.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.