Fail2abuseipdb
A simple application for converting fail2ban's jail output to an abuseipdb-compatible CSV
Data Structures | Public Member Functions | Private Attributes
StringSplit Struct Reference

Splits a string into tokens, usable in an iterator loop, based on a delimiter. More...

#include <string_splitter.hpp>

Collaboration diagram for StringSplit:
Collaboration graph
[legend]

Data Structures

struct  Iterator
 Simple implementation of an iterator usable in a iterative for-loop. More...
 

Public Member Functions

 StringSplit (const string &input, const string &delim)
 Constructs a new instance of. More...
 
Iterator begin ()
 Gets the beginning of the iterator. More...
 
Iterator end ()
 Returns the end of the iterator. More...
 

Private Attributes

Iterator m_iteratorBeginning
 The beginning iterator. More...
 

Detailed Description

Splits a string into tokens, usable in an iterator loop, based on a delimiter.

Definition at line 22 of file string_splitter.hpp.

Constructor & Destructor Documentation

◆ StringSplit()

StringSplit::StringSplit ( const string &  input,
const string &  delim 
)
inline

Constructs a new instance of.

See also
StringSplit
Parameters
inputThe input string to be split into tokens.
delimThe delimiter by which to split the strings.

Definition at line 99 of file string_splitter.hpp.

99 : m_iteratorBeginning{std::move(input), std::move(delim)} { }
Iterator m_iteratorBeginning
The beginning iterator.

Member Function Documentation

◆ begin()

Iterator StringSplit::begin ( )
inline

Gets the beginning of the iterator.

Returns
Iterator The beginning iterator (position)

Definition at line 106 of file string_splitter.hpp.

106 { return m_iteratorBeginning; }

◆ end()

Iterator StringSplit::end ( )
inline

Returns the end of the iterator.

Returns
Iterator The end iterator.

Definition at line 113 of file string_splitter.hpp.

113 { return Iterator{}; }

References StringSplit::Iterator::Iterator().

Field Documentation

◆ m_iteratorBeginning

Iterator StringSplit::m_iteratorBeginning
private

The beginning iterator.

Definition at line 90 of file string_splitter.hpp.


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