summaryrefslogtreecommitdiff
path: root/AK/MemMem.h
AgeCommit message (Collapse)Author
2023-02-08Everywhere: Use ReadonlySpan<T> instead of Span<T const>MacDue
2022-12-03Everywhere: Run clang-formatLinus Groh
2022-07-14AK: Use the correct data types in bitap_bitwise()Ali Mohammad Pur
Otherwise the bit twiddling goes all wrong and breaks some boundary cases. Fixes `StringView::contains(31-chars)`.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-01-29Everywhere: Remove redundant inline keywordLenny Maiorani
`constexpr` implies `inline` so when both are used it is redundant.
2021-11-22AK: Mark MemMem header-only functions as inline rather than staticAndrew Kaster
Avoid including a per-translation unit copy of all these functions. Also, drive-by two clang-tidy fixes for readability-qualified-auto and readability-implicit-bool-conversion.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-01-12AK: Add String{View,}::find(StringView)AnotherTest
I personally mistook `find_first_of(StringView)` to be analogous to this so let's add a `find()` method that actually searches the string.
2020-12-08AK: Implement memmem() for iterator haystacksAnotherTest
This uses the KMP algorithm to implement the search. Also replaces the slow route of the normal memmem() with KMP, which should be fairly faster (O(n + m) as opposed to O(n * m)) :^)
2020-08-21AK+LibC+Kernel: Move the implementation of memmem to AKAnotherTest