RSTools 3.1.0
Versatile C++20 utility library
Loading...
Searching...
No Matches
Compare.hpp File Reference
#include "RST/string/Char.hpp"
#include <cstddef>
#include <string_view>

Go to the source code of this file.

Namespaces

namespace  RST
 Root namespace of RSTools.
 
namespace  RST::String
 String helpers: case, trimming, splitting, joining, replacing, parsing and hashing.
 

Functions

Searching and comparing

The IgnoreCase variants ignore the case of ASCII letters.

constexpr bool RST::String::contains (std::string_view str, std::string_view needle) noexcept
 
constexpr bool RST::String::contains (std::string_view str, char c) noexcept
 
constexpr bool RST::String::equalsIgnoreCase (std::string_view lhs, std::string_view rhs) noexcept
 
constexpr bool RST::String::startsWithIgnoreCase (std::string_view str, std::string_view prefix) noexcept
 
constexpr bool RST::String::endsWithIgnoreCase (std::string_view str, std::string_view suffix) noexcept
 
constexpr std::size_t RST::String::findIgnoreCase (std::string_view str, std::string_view needle, std::size_t from=0) noexcept
 Position of the first needle at or after from, or std::string_view::npos.
 
constexpr bool RST::String::containsIgnoreCase (std::string_view str, std::string_view needle) noexcept
 
constexpr int RST::String::compareIgnoreCase (std::string_view lhs, std::string_view rhs) noexcept
 Three-way comparison like strcmp: negative, zero or positive.