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

◆ SanitizeString()

static string SanitizeString ( string input)
staticprotected

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

864 {
865 int max_length = 512;
866 string output = input;
867
868 output = output.Substring(0,Math.Clamp(max_length,0,output.Length()));
869 return output;
870 }
Определения 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().