[#script-Const]
= xref:script.adoc[script]::Const
:relfileprefix: ../
:mrdocs:

Parse a constant&period;

== Synopsis

Declared in `&lt;script&sol;parsing&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
Const(
    std::string const& str,
    std::span&lt;char const&gt;& sp,
    bool skip = true);
----

== Description

If sp&apos;s initial part matches str, sp is optionally updated to skip that part, and true is returned&period; Otherwise sp is unmodified and false is returned&period;

== Return Value

true if sp begins with str, false otherwise&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| The constant text to match against the start of sp&period;
| *sp*
| The input span&semi; on a match it is advanced past the constant when skip is true&period;
| *skip*
| Whether to advance sp past the matched constant&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
