Function begins_with

Summary

#include "breeze/text/begins_with.hpp"

(1) bool begins_with(std::string const &s, std::string const &with) noexcept

(2) bool begins_with(std::string const &s, char c) noexcept

Function overload

Synopsis

#include "breeze/text/begins_with.hpp"

bool begins_with(std::string const &s, std::string const &with) noexcept

Description

Returns
Whether s begins with with. If with is empty, the result is always true.
Note
[FUTURE] C++20 will have std::basic_string::starts_with() and std::basic_string_view::starts_with() for this.
See
ends_with().

Source

Line 38 in breeze/text/begins_with.hpp.

Synopsis

#include "breeze/text/begins_with.hpp"

bool begins_with(std::string const &s, char c) noexcept

Description

Returns
true if and only if s begins with c; i.e. if and only if ! s.empty() && s.front() == c.

Source

Line 48 in breeze/text/begins_with.hpp.