| ofs | hex dump | ascii |
|---|
| 0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 80 00 00 00 80 08 06 00 00 00 c3 3e 61 | .PNG........IHDR..............>a |
| 0020 | cb 00 00 00 04 73 42 49 54 08 08 08 08 7c 08 64 88 00 00 00 09 70 48 59 73 00 00 1e 8c 00 00 1e | .....sBIT....|.d.....pHYs....... |
| 0040 | 8c 01 35 78 7c a9 00 00 00 19 74 45 58 74 53 6f 66 74 77 61 72 65 00 77 77 77 2e 69 6e 6b 73 63 | ..5x|.....tEXtSoftware.www.inksc |
| 0060 | 61 70 65 2e 6f 72 67 9b ee 3c 1a 00 00 0c ae 49 44 41 54 78 da ed 5d 5b 6c 15 c7 19 b6 04 7e c9 | ape.org..<.....IDATx..][l.....~. |
| 0080 | 43 d4 c7 4a 91 fc 9c 87 3c f8 31 c6 06 c7 31 36 36 d8 07 df e2 d8 60 e3 19 df b0 09 17 07 73 71 | C..J....<.1...166.....`.......sq |
| 00a0 | d2 e0 50 ab aa db 0a 25 84 26 b8 a4 0d 75 82 42 53 44 45 d3 c4 22 40 1b 0c 41 36 01 87 70 b1 a2 | ..P....%.&...u.BSDE.."@..A6..p.. |
| 00c0 | 34 91 22 51 44 85 93 48 69 a4 20 51 5a 3a 9d ef 78 17 66 77 67 f7 1c db bb e7 ec 39 fb 3f 7c d2 | 4."QD..Hi..QZ:..x.fwg......9.?|. |
| 00e0 | d1 ee b7 f3 cf ce ff 9d dd b9 fc f3 6f 8e 10 22 c7 8e 75 eb 58 ae 44 4c 62 48 62 4c 62 46 42 10 | ............o.."..u.X.DLbHbLbFB. |
| 0100 | 12 e2 b6 c4 22 5d 9b ce 05 b2 8c 7d 3e d4 65 c6 f0 dd 90 e1 cb 5c 9d 2d 9d f1 7c 89 2b e4 cc 79 | ...."].....}>.e......\.-..|.+..y |
| 0120 | e3 31 1f 04 70 3e 80 7a c1 a7 f9 ae 02 80 72 25 06 25 ee 92 13 17 04 b6 40 e7 e3 e9 7b 27 a0 ba | .1..p>.z......r%.%......@...{'.. |
| 0140 | dd 35 7c bc 48 27 80 41 72 9e 2f 38 bc 40 01 94 a5 a0 8e 83 16 01 18 8f 7d fa e7 fb 87 f2 79 3a | .5|.H'.Ar./8.@..........}.....y: |
| 0160 | ff 21 89 2f 53 50 bf bb e6 eb c0 7c e4 d0 3b df 5f 5c 97 78 78 1e 02 d8 9b c2 3a c2 e7 b9 39 46 | .!./SP.....|..;._\.xx.....:...9F |
| 0180 | 0f d1 8b 38 21 71 93 9c 3a 67 9c 92 78 24 49 c7 a3 ff b5 5d e2 9e 8f f6 6f 1a be f3 e2 c4 72 8c | ...8!q..:g..x$I....]....o.....r. |
| 01a0 | 61 82 1b a1 d4 a8 e0 62 89 11 72 ea 9c f1 9d 44 5b 02 e7 3f 2a 31 e9 b3 5d f8 6a b1 51 7e a9 07 | a......b..r....D[..?*1..].j.Q~.. |
| 01c0 | 6f 28 c7 18 2b 6a ff f9 b6 8a e6 91 43 e7 8d cf 24 46 25 36 4a 2c 93 68 96 d8 23 31 1e 50 8f 3f | o(..+j......C...$F%6J,.h..#1.P.? |
| 01e0 | cf e6 3b b7 27 c1 58 8e c7 24 cf 4d 53 45 46 21 25 e4 c8 8c 41 89 e2 b7 c5 1e af f0 99 9c 24 1e | ..;.'.X..$.MSEF!%...A.........$. |
| 0200 | 25 79 86 f3 a7 a8 61 33 06 53 86 cf f2 12 bd ba 73 a8 b1 a2 0d 12 00 09 80 1a 81 04 40 20 01 64 | %y....a3.S......s...........@..d |
| 0220 | 32 7a ba 99 f8 ed 5e 2e 7e fa 13 77 ce e6 67 98 38 f8 6b 26 06 fa dd 39 38 07 0e b8 6e 1c d8 80 | 2z....^.~..w..g.8.k&...98...n... |
| 0240 | 2d d8 24 01 84 00 1d ed 4c fc e3 22 17 df 5e 9b c5 9b af 39 39 5b b7 30 f1 f5 d5 07 9c 5f 0d 39 | -.$.....L.."..^....99[.0....._.9 |
| 0260 | 39 38 66 9e 07 17 d7 d8 39 28 db e4 c0 26 6c 93 00 d2 8c 97 87 1f 38 05 f8 e2 1c 77 70 8e bc c1 | 98f.....9(...&l.......8....wp... |
| 0280 | 2d 9c 33 c7 9c e5 e0 98// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
namespace Tango.Scripting.Editors.Utils
{
/// <summary>
/// Represents a string with a segment.
/// Similar to System.ArraySegment<T>, but for strings instead of arrays.
/// </summary>
public struct StringSegment : IEquatable<StringSegment>
{
readonly string text;
readonly int offset;
readonly int count;
/// <summary>
/// Creates a new StringSegment.
/// </summary>
public StringSegment(string text, int offset, int count)
{
if (text == null)
throw new ArgumentNullException("text");
if (offset < 0 || offset > text.Length)
throw new ArgumentOutOfRangeException("offset");
if (offset + count > text.Length)
throw new ArgumentOutOfRangeException("count");
this.text = text;
this.offset = offset;
this.count = count;
}
/// <summary>
/// Creates a new StringSegment.
/// </summary>
public StringSegment(string text)
{
if (text == null)
throw new ArgumentNullException("text");
this.text = text;
this.offset = 0;
this.count = text.Length;
}
/// <summary>
/// Gets the string used for this segment.
/// </summary>
public string Text {
get { return text; }
}
/// <summary>
/// Gets the start offset of the segment with the text.
/// </summary>
public int Offset {
get { return offset; }
}
/// <summary>
/// Gets the length of the segment.
/// </summary>
public int Count {
get { return count; }
}
#region Equals and GetHashCode implementation
/// <inheritdoc/>
public override bool Equals(object obj)
{
if (obj is StringSegment)
return Equals((StringSegment)obj); // use Equals method below
else
return false;
}
/// <inheritdoc/>
public bool Equals(StringSegment other)
{
// add comparisions for all members here
return object.ReferenceEquals(this.text, other.text) && offset == other.offset && count == other.count;
}
/// <inheritdoc/>
public override int GetHashCode()
{
return text.GetHashCode() ^ offset ^ count;
}
/// <summary>
/// Equality operator.
/// </summary>
public static bool operator ==(StringSegment left, StringSegment right)
{
return left.Equals(right);
}
/// <summary>
/// Inequality operator.
/// </summary>
public static bool operator !=(StringSegment left, StringSegment right)
{
return !left.Equals(right);
}
#endregion
}
}
|