summaryrefslogtreecommitdiff
path: root/Userland/Utilities/expr.cpp
AgeCommit message (Collapse)Author
2021-07-10expr: Make Match expressions comply with POSIXAli Mohammad Pur
They should print the contents of capture group 1, if it exists.
2021-07-10expr: Use Basic Posix regular expressionsAli Mohammad Pur
Dr.POSIX requires expr to use BREs, so let's use BREs. Fixes #8506.
2021-07-09Utilities: Fix return value of exprJean-Baptiste Boric
2021-07-04Everywhere: Prefer using "..."sv over StringView { "..." }Gunnar Beutner
2021-05-24AK+Everywhere: Consolidate String::index_of() and String::find()Andreas Kling
We had two functions for doing mostly the same thing. Combine both of them into String::find() and use that everywhere. Also add some tests to cover basic behavior.
2021-05-17Utilities: Correct non-standard assert macros includesJean-Baptiste Boric
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-03-12Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)Andreas Kling
Good-bye LogStream. Long live AK::Format!
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-02-23AK+Userland: Extend the compiletime format string check to other functionsAnotherTest
Thanks to @trflynn89 for the neat implicit consteval ctor trick! This allows us to basically slap `CheckedFormatString` on any formatting function, and have its format argument checked at compiletime. Note that there is a validator bug where it doesn't parse inner replaced fields like `{:~>{}}` correctly (what should be 'left align with next argument as size' is parsed as `{:~>{` following a literal closing brace), so the compiletime checks are disabled on these temporarily by forcing them to be StringViews. This commit also removes the now unused `AK::StringLiteral` type (which was introduced for use with NTTP strings).
2021-01-12Userland: Move command-line utilities to Userland/Utilities/Andreas Kling