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

◆ MakeTables()

void System.Text.UTF7Encoding.MakeTables ( )
inlineprivate

Definition at line 189 of file UTF7Encoding.cs.

190 {
191 _base64Bytes = new byte[64];
192 for (int i = 0; i < 64; i++)
193 {
194 _base64Bytes[i] = (byte)"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[i];
195 }
196 _base64Values = new sbyte[128];
197 for (int j = 0; j < 128; j++)
198 {
199 _base64Values[j] = -1;
200 }
201 for (int k = 0; k < 64; k++)
202 {
203 _base64Values[_base64Bytes[k]] = (sbyte)k;
204 }
205 _directEncode = new bool[128];
206 int length = "\t\n\r '(),-./0123456789:?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".Length;
207 for (int l = 0; l < length; l++)
208 {
209 _directEncode[(uint)"\t\n\r '(),-./0123456789:?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[l]] = true;
210 }
211 if (_allowOptionals)
212 {
213 length = "!\"#$%&*;<=>@[]^_`{|}".Length;
214 for (int m = 0; m < length; m++)
215 {
216 _directEncode[(uint)"!\"#$%&*;<=>@[]^_`{|}"[m]] = true;
217 }
218 }
219 }
readonly bool _allowOptionals

References System.Text.UTF7Encoding._allowOptionals, System.Text.UTF7Encoding._base64Bytes, System.Text.UTF7Encoding._base64Values, System.Text.UTF7Encoding._directEncode, and System.length.

Referenced by System.Text.UTF7Encoding.UTF7Encoding().