using Amphora; namespace Tessera.UnitTests.Unicode { public static class ViewSamples { /// /// A view of the text sitting inside a larger array, so its StartIndex is not zero and chars lie either side. /// public static StringView ViewOf(string text) { var chars = new char[text.Length + 7]; for (int i = 0; i < chars.Length; ++i) { chars[i] = 'Z'; } text.CopyTo(0, chars, 3, text.Length); return new StringView(chars, 3, 3 + text.Length); } } }