Same as Range but with normal ints.
More...
|
| IntRange (int start, int end) |
|
override string | ToString () |
|
Same as Range but with normal ints.
Definition at line 16 of file Ranges.cs.
◆ IntRange()
CrabUI.IntRange.IntRange |
( |
int | start, |
|
|
int | end ) |
Definition at line 23 of file Ranges.cs.
24 {
25 if (end >= start) (Start, End) = (start, end);
26 else (End, Start) = (start, end);
27 }
◆ Parse()
static IntRange CrabUI.IntRange.Parse |
( |
string | raw | ) |
|
|
static |
Definition at line 32 of file Ranges.cs.
33 {
34 if (raw == null || raw == "") return new IntRange(0, 0);
35
36 string content = raw.Split('[', ']')[1];
37
38 List<string> coords = content.Split(',').Select(s => s.Trim()).ToList();
39
40 int start;
41 int end;
42
43 int.TryParse(coords.ElementAtOrDefault(0), out start);
44 int.TryParse(coords.ElementAtOrDefault(1), out end);
45
46 return new IntRange(start, end);
47 }
◆ End
◆ Start
int CrabUI.IntRange.Start |
◆ Zero
◆ IsEmpty
bool CrabUI.IntRange.IsEmpty |
|
get |
◆ IsZero
bool CrabUI.IntRange.IsZero |
|
get |
The documentation for this struct was generated from the following file: