Sigill / shellwords-cpp

Library designed to manipulate strings according to the word parsing rules of the UNIX Bourne shell (port of the Ruby Shellwords module).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shellwords-cpp

shellwords-cpp is a library designed to manipulate strings according to the word parsing rules of the UNIX Bourne shell.

See IEEE Std 1003.1-2008, 2016 Edition, the Shell & Utilities volume for more details.

It is a port of the Shellwords Ruby module.

Usage

Tokenization

// std::vector<std::string> shellsplit(const std::string& command);
shellsplit("ps -p 1234"); // ["ps", "-p", "1234"]

Stringification

// std::string shelljoin(const std::vector<std::string>& values);
shelljoin({"ps", "-p", "1234"}); // "ps -p 1234"

License

This tool is released under the terms of the MIT License. See the LICENSE.txt file for more details.

About

Library designed to manipulate strings according to the word parsing rules of the UNIX Bourne shell (port of the Ruby Shellwords module).

License:MIT License


Languages

Language:C++ 70.4%Language:CMake 29.6%