diff --git a/include/emio/detail/args.hpp b/include/emio/detail/args.hpp index 4c95608..0785b29 100644 --- a/include/emio/detail/args.hpp +++ b/include/emio/detail/args.hpp @@ -185,10 +185,10 @@ class args_span_with_str : public args_span { } /** - * Returns if it is just an empty plain string with no arguments passed. - * @return True, if the string is empty, otherwise false. + * Returns if it is just an empty plain string with no arguments. + * @return True, if the string is empty without any arguments, otherwise false. */ - [[nodiscard]] constexpr bool is_empty() const noexcept { + [[nodiscard]] constexpr bool empty() const noexcept { return is_plain_str() && get_str().value().empty(); } diff --git a/test/unit_test/test_format_string.cpp b/test/unit_test/test_format_string.cpp index d647ceb..01d7c44 100644 --- a/test/unit_test/test_format_string.cpp +++ b/test/unit_test/test_format_string.cpp @@ -136,7 +136,7 @@ TEST_CASE("default constructed format_args", "[format_string]") { CHECK(args.is_plain_str()); CHECK(args.get_str().value().empty()); CHECK(args.get_args().empty()); - CHECK(args.is_empty()); + CHECK(args.empty()); CHECK(emio::vformat(args).value() == ""); CHECK(emio::format("{}", args).value() == "");