[#BloombergLP-bdlb-String-skipLeadingTrailing]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/String.adoc[String]::skipLeadingTrailing
:relfileprefix: ../../../
:mrdocs:

Advance `&ast;begin` and regress `&ast;end` past surrounding whitespace&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;string&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
skipLeadingTrailing(
    char const** begin,
    char const** end);
----

== Description

Skip leading and trailing whitespace characters in the string indicated by the specified `&ast;begin` and `&ast;end` iterators by appropriately advancing `&ast;begin` and regressing `&ast;end`&period; If the indicated string is empty, or consists solely of whitespace characters, `&ast;begin` is unchanged and `&ast;end` is regressed to `&ast;begin`&period; Otherwise, advance `&ast;begin` to the first non&hyphen;whitespace character whose position is greater than or equal to `&ast;begin` and regress `&ast;end` to one past the position of the last non&hyphen;whitespace character whose position is less than `&ast;end`&period; The indicated string need not be null&hyphen;terminated and may contain embedded null (&apos;0&apos;) characters&period; The behavior is undefined unless `&ast;begin &lt;&equals; &ast;end`&period; Note that since `&ast;begin` and `&ast;end` are iterators, `&ast;end` refers to the character one past the end of the subject string&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *begin*
| iterator to the start of the string&semi; advanced past leading whitespace
| *end*
| iterator one past the end of the string&semi; regressed past trailing whitespace
|===


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