bigloo.foreign.bigloo_strncmp_at C# (CSharp) Method

bigloo_strncmp_at() public static method

public static bigloo_strncmp_at ( byte s1, byte s2, int d, int l ) : bool
s1 byte
s2 byte
d int
l int
return bool
        public static bool bigloo_strncmp_at(byte[] s1, byte[] s2, int d, int l)
        {
            int n1 = s1.Length;
            int n2 = s2.Length;
            int n = n2 < l ? n2 : l;

            if (d < 0 || (n1 < n + d) || (n < 0))
               return false;

            for (int i = 0; i < n; ++i)
               if (s1[i + d] != s2[i])
              return false;

            return true;
        }
foreign