General Utility Library for C++14  2.7
Namespaces | Functions
substring_checks.h File Reference

Detailed Description

Definition of contains(), ends_with(), and starts_with().

Authors
General Utility Library Contributors
Date
Created on 26 November 2018

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the license, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

#include "gul14/case_ascii.h"
#include "gul14/internal.h"
#include "gul14/string_view.h"
Include dependency graph for substring_checks.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 gul14
 Namespace gul14 contains all functions and classes of the General Utility Library.
 

Functions

constexpr bool gul14::contains (string_view haystack, string_view needle) noexcept
 Determine whether a string contains another string. More...
 
constexpr bool gul14::contains (string_view haystack, char needle) noexcept
 Determine whether a string contains a certain character. More...
 
constexpr bool gul14::ends_with (string_view str, string_view suffix) noexcept
 Determine whether a string ends with another string. More...
 
constexpr bool gul14::ends_with (string_view str, char c) noexcept
 Determine whether a string ends with a certain character. More...
 
constexpr bool gul14::starts_with (string_view str, string_view prefix) noexcept
 Determine whether a string starts with another string. More...
 
constexpr bool gul14::starts_with (string_view str, char c) noexcept
 Determine whether a string starts with a certain character. More...
 
constexpr bool gul14::equals_nocase (string_view str1, string_view str2) noexcept
 Determine whether a string is equal to another one, making no distinction between upper and lower case ASCII characters. More...
 
constexpr bool gul14::contains_nocase (string_view haystack, string_view needle) noexcept
 Determine whether a string contains another string. More...
 
constexpr bool gul14::contains_nocase (string_view haystack, char needle) noexcept
 Determine whether a string contains a certain character. More...
 
constexpr bool gul14::ends_with_nocase (string_view str, string_view suffix) noexcept
 Determine whether a string ends with another string. More...
 
constexpr bool gul14::ends_with_nocase (string_view str, char c) noexcept
 Determine whether a string ends with a certain character. More...
 
constexpr bool gul14::starts_with_nocase (string_view str, string_view prefix) noexcept
 Determine whether a string starts with another string. More...
 
constexpr bool gul14::starts_with_nocase (string_view str, char c) noexcept
 Determine whether a string starts with a certain character. More...