Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ParseArguements()

static Dictionary< string, string > Terraria.Utils.ParseArguements ( string[] args)
inlinestatic

Definition at line 103 of file Utils.cs.

104 {
105 string text = null;
106 string text2 = "";
108 for (int i = 0; i < args.Length; i++)
109 {
110 if (args[i].Length == 0)
111 {
112 continue;
113 }
114 if (args[i][0] == '-' || args[i][0] == '+')
115 {
116 if (text != null)
117 {
118 dictionary.Add(text.ToLower(), text2);
119 text2 = "";
120 }
121 text = args[i];
122 text2 = "";
123 }
124 else
125 {
126 if (text2 != "")
127 {
128 text2 += " ";
129 }
130 text2 += args[i];
131 }
132 }
133 if (text != null)
134 {
135 dictionary.Add(text.ToLower(), text2);
136 text2 = "";
137 }
138 return dictionary;
139 }
void Add(TKey key, TValue value)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.dictionary, System.Text.RegularExpressions.i, and System.text.

Referenced by Terraria.Program.LaunchGame().