static void Main(string[] args)
 {
     string str = "abcracadabra";
     // Create a new suffix array
     SuffixArray sa = new SuffixArray(str);
     // Find substring
     int index = sa.IndexOf("rac");
     // Get LCP value
     int lcp = sa.Lcp[index];
 }
Example #2
0
        public void Test2()
        {
            SuffixArray <char> sa = SuffixArray.Create((string)null);

            Assert.AreEqual(sa.IndexOf(new[] { 'a' }), -1, "Found wrong substring");
        }