summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-10-02 22:14:37 +0100
committerAndreas Kling <kling@serenityos.org>2020-10-03 12:36:49 +0200
commitbcfc6f0c57f9d4ce4343cbb6ee0f0ab8de56c789 (patch)
treed3e16e6361f4693ae5362c10da05bc6a4ad30190 /AK
parent4e86c34ef0d1d227309f8e8d22be5ea737830c24 (diff)
downloadserenity-bcfc6f0c57f9d4ce4343cbb6ee0f0ab8de56c789.zip
Everywhere: Fix more typos
Diffstat (limited to 'AK')
-rw-r--r--AK/Bitmap.h2
-rw-r--r--AK/Stream.h2
-rw-r--r--AK/String.cpp4
-rw-r--r--AK/String.h2
-rw-r--r--AK/TestSuite.h4
-rw-r--r--AK/Tests/TestBitmap.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/AK/Bitmap.h b/AK/Bitmap.h
index 0b7a3a8766..5bff0e7bfd 100644
--- a/AK/Bitmap.h
+++ b/AK/Bitmap.h
@@ -332,7 +332,7 @@ public:
// The function will return the next range of unset bits starting from the
// @from value.
- // @from: the postition from which the search starts. The var will be
+ // @from: the position from which the search starts. The var will be
// changed and new value is the offset of the found block.
// @min_length: minimum size of the range which will be returned.
// @max_length: maximum size of the range which will be returned.
diff --git a/AK/Stream.h b/AK/Stream.h
index 11d286acd6..a48fbba858 100644
--- a/AK/Stream.h
+++ b/AK/Stream.h
@@ -75,7 +75,7 @@ namespace AK {
class InputStream : public virtual AK::Detail::Stream {
public:
- // Reads at least one byte unless none are requested or none are avaliable. Does nothing
+ // Reads at least one byte unless none are requested or none are available. Does nothing
// and returns zero if there is already an error.
virtual size_t read(Bytes) = 0;
diff --git a/AK/String.cpp b/AK/String.cpp
index 177844fb61..feb482a714 100644
--- a/AK/String.cpp
+++ b/AK/String.cpp
@@ -302,7 +302,7 @@ bool String::equals_ignoring_case(const StringView& other) const
return StringUtils::equals_ignoring_case(view(), other);
}
-int String::replace(const String& needle, const String& replacement, bool all_occurences)
+int String::replace(const String& needle, const String& replacement, bool all_occurrences)
{
if (is_empty())
return 0;
@@ -316,7 +316,7 @@ int String::replace(const String& needle, const String& replacement, bool all_oc
pos = ptr - characters();
positions.append(pos);
- if (!all_occurences)
+ if (!all_occurrences)
break;
start = pos + 1;
diff --git a/AK/String.h b/AK/String.h
index 0d2cb3386a..8a124a5223 100644
--- a/AK/String.h
+++ b/AK/String.h
@@ -252,7 +252,7 @@ public:
StringView view() const;
- int replace(const String& needle, const String& replacement, bool all_occurences = false);
+ int replace(const String& needle, const String& replacement, bool all_occurrences = false);
template<typename T, typename... Rest>
bool is_one_of(const T& string, Rest... rest) const
diff --git a/AK/TestSuite.h b/AK/TestSuite.h
index 8e45634e23..ed0e36a486 100644
--- a/AK/TestSuite.h
+++ b/AK/TestSuite.h
@@ -152,14 +152,14 @@ void TestSuite::main(const String& suite_name, int argc, char** argv)
args_parser.add_option(do_tests_only, "Only run tests.", "tests", 0);
args_parser.add_option(do_benchmarks_only, "Only run benchmarks.", "bench", 0);
- args_parser.add_option(do_list_cases, "List avaliable test cases.", "list", 0);
+ args_parser.add_option(do_list_cases, "List available test cases.", "list", 0);
args_parser.add_positional_argument(search_string, "Only run matching cases.", "pattern", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);
const auto& matching_tests = find_cases(search_string, !do_benchmarks_only, !do_tests_only);
if (do_list_cases) {
- out() << "Avaliable cases for " << suite_name << ":";
+ out() << "Available cases for " << suite_name << ":";
for (const auto& test : matching_tests) {
out() << " " << test.name();
}
diff --git a/AK/Tests/TestBitmap.cpp b/AK/Tests/TestBitmap.cpp
index 029e373706..b94b95f378 100644
--- a/AK/Tests/TestBitmap.cpp
+++ b/AK/Tests/TestBitmap.cpp
@@ -158,7 +158,7 @@ TEST_CASE(set_range)
bitmap.set_range(48, 32, true);
bitmap.set_range(94, 39, true);
bitmap.set_range(190, 71, true);
- bitmap.set_range(190 + 71 - 7, 21, false); // slighly overlapping clear
+ bitmap.set_range(190 + 71 - 7, 21, false); // slightly overlapping clear
for (size_t i = 0; i < bitmap.size(); i++) {
bool should_be_set = (i >= 48 && i < 48 + 32)
|| (i >= 94 && i < 94 + 39)