strtok

Синтаксис

native strtok(const text[], Left[], leftLen, Right[], rightLen, token=' ', trimSpaces=0);

Употреба

text
String to tokenize
Left
Buffer to store left half
leftLen
Size of left buffer
Right
Buffer to store right half
rightLen
Size of right buffer
token
Token to split by
trimSpaces
Whether spaces are trimmed.

Описание

Breaks a string in two by token.

Забележка

Trimming spaces is buggy. Consider strtok2 instead.

Забележка

See argbreak() for doing this with parameters.
Example:
 str1[] = This *is*some text
 strtok(str1, left, 24, right, 24, '*')
 left will be "This "
 Right will be "is*some text"
 If you use trimSpaces, all spaces are trimmed from Left.

Връщаща стойност

Тази функция няма връщаща стойност.