Returns whether a given string text begins with prefix.

Synopsis

Declared in <absl/strings/match.h>

constexpr
bool
StartsWith(
    std::string_view text,
    std::string_view prefix) noexcept;

Return Value

true if text begins with prefix, false otherwise.

Parameters

Name

Description

text

The string to test.

prefix

The prefix to look for.

Created with MrDocs