/// <summary> /// Find a Int4String in a MultiInt4StringBuffer /// </summary> /// <param name="searchFor">The string to find a match for</param> /// <param name="encodedBufferStrings">The shared buffer's bytes</param> /// <param name="indices">The shared buffer's string start indices</param> /// <returns>The index into the indices buffer that the string was matched at</returns> public static int FindString(ref Int4String searchFor, ref NativeArray <int4> encodedBufferStrings, ref NativeArray <int> indices) { var array = searchFor.IntBytes; return(FindString(ref array, ref encodedBufferStrings, ref indices)); }
public SingleStringSearchJobInt4(Int4String searchFor, Int4StringBuffer buffer, NativeArray <int> output) { if (output.Length != 1) { Debug.LogWarning("Please provide a NativeArray<int> of length 1 for the output parameter"); } SearchFor = searchFor; EncodedBufferStrings = buffer.Data; Indices = buffer.Indices; FoundIndex = output; }