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

This class provides (read&hyphen;only) sequential access to tokens delimited by two user&hyphen;supplied character sets consisting, respectively, of _soft_ and _hard_ delimiters characters&period; Access to the previous and current (trailing) delimiter, as well as to the current token itself, is provided efficiently via `bslstl&colon;&colon;StringRef`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Tokenizer;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/Tokenizer/iterator.adoc[`iterator`] 
| Input&hyphen;iterator type over tokens in the bound input string&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/Tokenizer/2constructor-08.adoc[`Tokenizer`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlb/Tokenizer/2destructor.adoc[`&#126;Tokenizer`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bdlb/Tokenizer/begin.adoc[`begin`] 
| Return an iterator referring to the first token in this object&apos;s input string (the past&hyphen;the&hyphen;end iterator if this object iteration state is initially invalid)&period; This reference remains valid as long as the underlying input has not been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/end.adoc[`end`] 
| Return an iterator referring to position beyond the last token in this object&apos;s input string&period; This reference remains valid as long as the underlying input has not been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/hasPreviousSoft.adoc[`hasPreviousSoft`] 
| Return `true` if the previous delimiter (or _leader_) contains a _soft_ delimiter character, and `false` otherwise&period; The behavior is undefined if the underlying input itself has been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/hasTrailingSoft.adoc[`hasTrailingSoft`] 
| Return `true` if the current (trailing) delimiter contains a _soft_ delimiter character, and `false` otherwise&period; The behavior is undefined if the iteration state of this object is initially invalid, or if the underlying input itself has been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/isPreviousHard.adoc[`isPreviousHard`] 
| Return `true` if the previous delimiter contains a _hard&hyphen;delimiter_ character, and `false` otherwise&period; The behavior is undefined if the underlying input itself has been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/isTrailingHard.adoc[`isTrailingHard`] 
| Return `true` if the current (trailing) delimiter contains a _hard_ delimiter character, and `false` otherwise&period; The behavior is undefined if the iteration state of this object is initially invalid, or if the underlying input itself has been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/isValid.adoc[`isValid`] 
| Return `true` if the iteration state of this object is valid, and `false` otherwise&period; Note that the behavior of advancing the iteration state as well as accessing the current token or (trailing) delimiter is undefined unless the current iteration state of this object is valid&period;
| xref:BloombergLP/bdlb/Tokenizer/operator_inc-02.adoc[`operator&plus;&plus;`] 
| Advance the iteration state of this object to refer to the next sequence of previous delimiter, current token, and current (trailing) delimiter in the underlying input sequence, and return a reference providing modifiable access to this object&period; The current delimiter reference becomes the previous one&period; If there is another token remaining in the input, the current token and delimiter are updated to refer to the respective new token and (trailing) delimiter values &hyphen;&hyphen; either of which (but not both) might be empty&period; If there are no tokens remaining in the input, the iteration state of this object becomes invalid&period; The behavior is undefined unless the iteration state of this object is initially valid, or if the underlying input has been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/previousDelimiter.adoc[`previousDelimiter`] 
| Return a reference to the non&hyphen;modifiable previous delimiter (or _leader_) in the input string&period; The behavior is undefined if the underlying input has been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/reset-04.adoc[`reset`] 
| `reset` overloads
| xref:BloombergLP/bdlb/Tokenizer/token.adoc[`token`] 
| Return a reference to the non&hyphen;modifiable current token (i&period;e&period;, maximal sequence of non&hyphen;delimiter characters) in the input string&period; The returned reference remains valid so long as the underlying input is not modified or destroyed &hyphen;&hyphen; irrespective of the state (or existence) of this object&period; The behavior is undefined unless the iteration state of this object is initially valid, or if the underlying input has been modified or destroyed since this object was most recently reset (or created)&period;
| xref:BloombergLP/bdlb/Tokenizer/trailingDelimiter.adoc[`trailingDelimiter`] 
| Return a reference to the non&hyphen;modifiable current (trailing) delimiter (maximal sequence of one or more delimiter characters containing at most one _hard_ delimiter character) in the input string&period; The returned reference remains valid so long as the underlying input is not modified or destroyed &hyphen;&hyphen; irrespective of the state (or existence) of this object&period; The behavior is undefined unless the iteration state of this object is initially valid, or if the underlying input has been modified or destroyed since this object was most recently reset (or created)&period;
|===



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