StrContains overloads

Synopses

Declared in <absl/strings/match.h>

Returns whether a given string haystack contains the character needle.

bool
StrContains(
    std::string_view haystack,
    char needle) noexcept;

Returns whether a given string haystack contains the substring needle.

bool
StrContains(
    std::string_view haystack,
    std::string_view needle) noexcept;

Return Value

true if needle is found in haystack, false otherwise.

Parameters

Name

Description

haystack

The string to search within.

needle

The character to search for.

Created with MrDocs