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

◆ ProcessIntoIPAddress()

bool ScriptedWidgetEventHandler::ProcessIntoIPAddress ( out string potential_ip)
inlineprotected

Removes all characters from the given string whirh are NOT a number, '.' or ':'. Returns true if any change was done to the input text.

См. определение в файле ServerBrowserFilterContainer.c строка 251

252 {
253 bool was_text_changed = false;
254 int length = potential_ip.Length();
255
256 // Filter out incompatible characters
257 for (int i = length - 1 ; i >= 0; --i)
258 {
259 string character = potential_ip.Get(i);
260
261 if (character.ToInt() == 0 && character != "0" && character != "." && character != ":")
262 {
263 potential_ip = potential_ip.SubstringInverted(potential_ip, i, i + 1);
264 was_text_changed = true;
265 }
266 }
267
268 bool text_was_shortened = LimitTextBoxCharacterCount(potential_ip, 21);
269
270 return (was_text_changed || text_was_shortened);
271 }
bool LimitTextBoxCharacterCount(out string text, int max_length)
Limits the given text to 'max_length' character count. Returns true if any change was done to the inp...
Определения ServerBrowserFilterContainer.c:274
proto native int ToInt()
Converts string to integer.

Перекрестные ссылки LimitTextBoxCharacterCount() и string::ToInt().

Используется в OnChange().