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

◆ SanitizeString()

static string SanitizeString ( string input)
staticprotected

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

931 {
932 int max_length = 512;
933 string output = input;
934
935 output = output.Substring(0,Math.Clamp(max_length,0,output.Length()));
936 return output;
937 }
Определения EnMath.c:7
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
proto native int Length()
Returns length of string.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.

Перекрестные ссылки Math::Clamp(), string::Length() и string::Substring().