DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ParseStringEx()

proto int string::ParseStringEx ( out string token)
private

Parses one token from input string. Result is put into token string, and type of token is returned. Input string is left-truncated by the resulting token length.

Аргументы
[out]tokenstring Founded string token
Возвращает
int Type of token
Token types:
 0 - error, no token
 1 - defined token (special characters etc. . / * )
 2 - quoted string. Quotes are removed -> TODO
 3 - alphabetic string
 4 - number
 5 - end of line -> TODO
string input = "Hello*World";
string token1;
string token2;
int result1 = input.ParseStringEx(token1);
int result2 = input.ParseStringEx(token2);
Print( "Token1 = '" + token1 + "' Type = " + result1.ToString() ) );
Print( "Token2 = '" + token2 + "' Type = " + result2.ToString() ) );
>> 'Toke1 = 'Hello' Type = 3'
>> 'Toke1 = '*' Type = 1'
proto void Print(void var)
Prints content of variable to console/log.
proto int ParseStringEx(out string token)
Parses one token from input string. Result is put into token string, and type of token is returned....