Lucene.Net.Analysis.Compound.Hyphenation.HyphenationTree.HStrCmp C# (CSharp) Method

HStrCmp() protected method

String compare, returns 0 if equal or t is a substring of s
protected HStrCmp ( char s, int si, char t, int ti ) : int
s char
si int
t char
ti int
return int
        protected internal virtual int HStrCmp(char[] s, int si, char[] t, int ti)
        {
            for (; s[si] == t[ti]; si++, ti++)
            {
                if (s[si] == 0)
                {
                    return 0;
                }
            }
            if (t[ti] == 0)
            {
                return 0;
            }
            return s[si] - t[ti];
        }