| 1605 | // |
| 1606 | |
| 1607 | INTN FindMem(IN CONST VOID *Buffer, IN UINTN BufferLength, IN CONST VOID *SearchString, IN UINTN SearchStringLength) |
| 1608 | { |
| 1609 | CONST UINT8 *BufferPtr; |
| 1610 | UINTN Offset; |
| 1611 | |
| 1612 | BufferPtr = (CONST UINT8 *)Buffer; |
| 1613 | BufferLength -= SearchStringLength; |
| 1614 | for (Offset = 0; Offset < BufferLength; Offset++, BufferPtr++) { |
| 1615 | if (CompareMem(BufferPtr, SearchString, SearchStringLength) == 0) |
| 1616 | return (INTN)Offset; |
| 1617 | } |
| 1618 | |
| 1619 | return -1; |
| 1620 | } |
| 1621 | |
| 1622 | /** |
| 1623 | This function converts an input device structure to a Unicode string. |
no test coverage detected