org.apache.lucene.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];
	  }