iplock: snap Namespace Reference

iplock  3.0.18
A command line tool to add and remove rules from your firewall without you having to be root.
snap Namespace Reference
Functions template<class ContainerT > size_t tokenize_string (ContainerT &tokens, typename ContainerT::value_type const &str, typename ContainerT::value_type const &delimiters, bool const trim_empty=false, typename ContainerT::value_type const &trim_string=typename ContainerT::value_type())  Transform a string in a vector of strings. More...
  Function Documentation
template<class ContainerT >
size_t snap::tokenize_string ( ContainerT &  tokens, typename ContainerT::value_type const &  str, typename ContainerT::value_type const &  delimiters, bool const  trim_empty = false, typename ContainerT::value_type const &  trim_string = typename ContainerT::value_type()  )

This function transforms a string to a vector a strings as separated by the specified delimiters.

The trim_empty parameter can be used to avoid empty entries, either at the start, middle, or end.

If the tokens vector is not empty, the items of the string being tokenized will be appended to the existing vector.
[in,out]tokensThe container receiving the resulting strings. [in]strThe string to tokenize. [in]delimitersThe list of character delimiters. [in]trim_emptyWhether to keep empty entries or not. [in]trim_stringTrim those characters from the start/end before saving.
the number of items in the resulting container.

Definition at line 51 of file tokenize_string.h.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly