---
name: "shevek_split"
section: "3"
platform: "linux"
package: "libshevek-doc"
version: "1.4-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/shevek_split"
---

# shevek\_split(3)

Split a string into words and retrieve them individually.

## NAME

shevek::split -

Split a string into words and retrieve them individually.

## SYNOPSIS

`#include <split.hh>`

Inherits vector\< std::string \>.

### Public Member Functions

**split** (std::string const &str=std::string())\
 *Create a new split object, and optionally load it with data.*  void **load** (std::string const &str, bool allow\_empty=false, std::string const &delimiters=std::string(' \\t\\v\\f\\a\\n\\r\\0', 8))\
 *Load new data into an existing split object.*  std::string **operator\[\]** (unsigned idx) const \
 *Get a word from the split object.*  **split** **sub** (unsigned from) const \
 *Get a new split object containing only the last part of this one.*

## Detailed Description

Split a string into words and retrieve them individually.

## Member Function Documentation

### std::string shevek::split::operator\[\] (unsignedidx) const` [inline]`

Get a word from the split object. This differs from std::vector's method in that it returns an empty string if idx is out of range.

## Author

Generated automatically by Doxygen for libshevek from the source code.
