nfx-stringutils 1.2.0
Cross-platform C++ string utilities library with validation and manipulation functions
Loading...
Searching...
No Matches
nfx::string::Splitter Class Reference

Zero-allocation string splitting iterator for performance-critical paths. More...

#include <nfx/string/Splitter.h>

Classes

class  Iterator
 Forward iterator for string segments. More...

Public Member Functions

template<typename String>
 Splitter (String &&str, char delimiter) noexcept
 Constructs a Splitter for the given string and delimiter.
Iterator begin () const noexcept
 Returns iterator to first segment.
Iterator end () const noexcept
 Returns end iterator for range-based loops.

Detailed Description

Zero-allocation string splitting iterator for performance-critical paths.

Provides efficient string_view-based splitting without heap allocations

Definition at line 48 of file Splitter.h.

Constructor & Destructor Documentation

◆ Splitter()

template<typename String>
nfx::string::Splitter::Splitter ( String && str,
char delimiter )
inlineexplicitnoexcept

Constructs a Splitter for the given string and delimiter.

Accepts any string-like type that can be converted to std::string_view

Template Parameters
StringAny type convertible to std::string_view (std::string, const char*, etc.)
Parameters
strString to split
delimiterCharacter to split on
Here is the caller graph for this function:

Member Function Documentation

◆ begin()

Iterator nfx::string::Splitter::begin ( ) const
inlinenoexcept

Returns iterator to first segment.

Returns
Iterator pointing to the first string segment

◆ end()

Iterator nfx::string::Splitter::end ( ) const
inlinenoexcept

Returns end iterator for range-based loops.

Returns
End iterator for range-based iteration
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: