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

◆ InsertAtPos()

static string InsertAtPos ( string base,
string insert,
int pos )
staticprotected

Insert 'insert' behind index 'pos' of the 'base' string.

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

259 {
260 int length_first = pos+1;
261 int length_base = base.Length();
262 int length_second = length_base - length_first;
263 string first = base.Substring(0,length_first);
264 string second = base.Substring(pos+1,length_second);
265 return first + insert + second;
266 }
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.

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

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