public static boolean startsWith(BytesRef ref, BytesRef prefix) {if (ref.length < prefix.length) {return false;}return Arrays.equals(ref.bytes, ref.offset, ref.offset + prefix.length,prefix.bytes, prefix.offset, prefix.offset + prefix.length);}

public static bool StartsWith(BytesRef @ref, BytesRef prefix) {return SliceEquals(@ref, prefix, 0);}
