Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
UnicodeRange.cs
Go to the documentation of this file.
1namespace System.Text.Unicode;
2
3public sealed class UnicodeRange
4{
5 public int FirstCodePoint { get; private set; }
6
7 public int Length { get; private set; }
8
9 public UnicodeRange(int firstCodePoint, int length)
10 {
11 if (firstCodePoint < 0 || firstCodePoint > 65535)
12 {
13 throw new ArgumentOutOfRangeException("firstCodePoint");
14 }
15 if (length < 0 || (long)firstCodePoint + (long)length > 65536)
16 {
17 throw new ArgumentOutOfRangeException("length");
18 }
19 FirstCodePoint = firstCodePoint;
20 Length = length;
21 }
22
23 public static UnicodeRange Create(char firstCharacter, char lastCharacter)
24 {
25 if (lastCharacter < firstCharacter)
26 {
27 throw new ArgumentOutOfRangeException("lastCharacter");
28 }
29 return new UnicodeRange(firstCharacter, 1 + (lastCharacter - firstCharacter));
30 }
31}
static UnicodeRange Create(char firstCharacter, char lastCharacter)
UnicodeRange(int firstCodePoint, int length)