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

◆ AddString()

void JsonObject::AddString ( string name,
string value )
inlineprivate

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

33 {
34 array<string> strgs = new array<string>;
35 value.Split("\"", strgs);
36
37 if ( strgs.Count() > 1 )
38 {
39 value = "";
40 int str_count = strgs.Count();
41
42 for ( int i = 0; i < str_count; ++i )
43 {
44 string s = strgs[i];
45
46 int length = s.Length();
47
48 if ( s[length - 1] != "\\" )
49 {
50 value += s;
51
52 if (i < str_count - 1 )
53 {
54 value += "\\";
55 value += "\"";
56 }
57 }
58 }
59 }
60
61 m_Strings.Insert(name, value);
62 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ref map< string, string > m_Strings
Определения JsonObject.c:3
proto native int Length()
Returns length of string.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
Определения EnString.c:396

Перекрестные ссылки string::Length(), m_Strings, name и string::Split().