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

◆ Append() [18/24]

void System.Text.ValueStringBuilder.Append ( Rune rune)
inline

Definition at line 194 of file ValueStringBuilder.cs.

195 {
196 int pos = _pos;
197 Span<char> chars = _chars;
198 if ((uint)(pos + 1) < (uint)chars.Length && (uint)pos < (uint)chars.Length)
199 {
200 if (rune.Value <= 65535)
201 {
202 chars[pos] = (char)rune.Value;
203 _pos = pos + 1;
204 }
205 else
206 {
207 chars[pos] = (char)((long)rune.Value + 56557568L >> 10);
208 chars[pos + 1] = (char)(((ulong)rune.Value & 0x3FFuL) + 56320);
209 _pos = pos + 2;
210 }
211 }
212 else
213 {
214 GrowAndAppend(rune);
215 }
216 }

References System.Text.ValueStringBuilder._chars, System.Text.ValueStringBuilder._pos, System.chars, System.Text.ValueStringBuilder.GrowAndAppend(), System.L, and System.Text.Rune.Value.