diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-24 11:50:46 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-24 11:59:18 +0200 |
commit | de395a3df236eb653db78b5b88a0178036f99ba0 (patch) | |
tree | 2a6bd2f6126aa62650fc92092eaa4d88ebebc19e /Userland/Libraries/LibELF | |
parent | 875a2cbb7150b036af343364a8bf2d07a97dd03d (diff) | |
download | serenity-de395a3df236eb653db78b5b88a0178036f99ba0.zip |
AK+Everywhere: Consolidate String::index_of() and String::find()
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.
Diffstat (limited to 'Userland/Libraries/LibELF')
-rw-r--r-- | Userland/Libraries/LibELF/Image.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibELF/Image.cpp b/Userland/Libraries/LibELF/Image.cpp index b9bde0e15f..820996c72a 100644 --- a/Userland/Libraries/LibELF/Image.cpp +++ b/Userland/Libraries/LibELF/Image.cpp @@ -297,7 +297,7 @@ Optional<Image::Symbol> Image::find_demangled_function(const String& name) const if (symbol.is_undefined()) return IterationDecision::Continue; auto demangled = demangle(symbol.name()); - auto index_of_paren = demangled.index_of("("); + auto index_of_paren = demangled.find('('); if (index_of_paren.has_value()) { demangled = demangled.substring(0, index_of_paren.value()); } |