All Projects → asit-dhal → stringify

asit-dhal / stringify

Licence: MIT license
print stl containers

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to stringify

stlkrn
C++ STL in the Windows Kernel with C++ Exception Support
Stars: ✭ 216 (+644.83%)
Mutual labels:  stl-containers
json-source-map
Parse/stringify JSON and provide source-map for JSON-pointers to all nodes - supports BigInt, Maps, Sets and Typed arrays
Stars: ✭ 55 (+89.66%)
Mutual labels:  stringify
stringify-keys
Build an array of key paths from an object.
Stars: ✭ 18 (-37.93%)
Mutual labels:  stringify
as-table
A simple function that prints objects as ASCII tables. Supports ANSI styling and weird Unicode 💩 emojis – they won't break the layout.
Stars: ✭ 54 (+86.21%)
Mutual labels:  stringify
Stringy
🉑 Stringy - A PHP string manipulation library with multibyte support, performance optimized
Stars: ✭ 135 (+365.52%)
Mutual labels:  stringify
node-lei-proto
简单的Buffer编码/解析模块
Stars: ✭ 14 (-51.72%)
Mutual labels:  stringify
ctl
My variant of the C Template Library
Stars: ✭ 105 (+262.07%)
Mutual labels:  stl-containers
nlcst-to-string
utility to transform an nlcst tree to a string
Stars: ✭ 16 (-44.83%)
Mutual labels:  stringify
lucene
Node.js lib to transform: lucene query → syntax tree → lucene query
Stars: ✭ 61 (+110.34%)
Mutual labels:  stringify
Fast Json Stringify
2x faster than JSON.stringify()
Stars: ✭ 2,499 (+8517.24%)
Mutual labels:  stringify
safe-json-stringify
A wrapper for JSON.stringify that handles circular references and prevent defined getters from throwing errors.
Stars: ✭ 51 (+75.86%)
Mutual labels:  stringify
imgui
Dear ImGui Addons Branch = plain unmodified dear imgui plus some extra addon.
Stars: ✭ 348 (+1100%)
Mutual labels:  stringify
Query String
Parse and stringify URL query strings
Stars: ✭ 5,781 (+19834.48%)
Mutual labels:  stringify
Json
JSON for Modern C++
Stars: ✭ 27,824 (+95844.83%)
Mutual labels:  stl-containers
json-peek
Stringify JSON *just enough* to see what it is
Stars: ✭ 33 (+13.79%)
Mutual labels:  stringify
tree.hh
An STL-like C++ header-only tree library
Stars: ✭ 79 (+172.41%)
Mutual labels:  stl-containers
hast-util-to-html
utility to serialize hast to HTML
Stars: ✭ 47 (+62.07%)
Mutual labels:  stringify
Vili
A nice and readable data format !
Stars: ✭ 25 (-13.79%)
Mutual labels:  stl-containers
xijs
A business - oriented scene Js Library
Stars: ✭ 91 (+213.79%)
Mutual labels:  stringify
Qs
A querystring parser with nesting support
Stars: ✭ 6,688 (+22962.07%)
Mutual labels:  stringify

stringify :- pretty print stl containers

  • can print all stl containers to output stream_

Build Status

Build Status
AppVeyor Build status
Travis Build Status

install

copy include/stringify.hpp to your source tree

local build

git clone https://github.com/asit-dhal/stringify
cd stringify
mkdir build 
cd build

for windows(Visual Studio 2015) build

cmake -G"Visual Studio 14 2015 Win64" ..

for linux

cmake ..

Usages

#include "stringify\stringify.hpp"
using namespace stringify;
std::vector<int> v1;
for (auto i = 0; i < 10; i++)
    v1.push_back(i);
std::cout << "vector<int>: " << v1 << std::endl;

If you don't want to include namespace, you can use stringify::to_string()

#include "stringify\stringify.hpp"
std::vector<int> v1;
for (auto i = 0; i < 10; i++)
    v1.push_back(i);
std::cout << "vector<int>: " << stringify::to_string(v1) << std::endl;

Print Format

container format example
std::string, const char* within double quote "dummy"
char, wchar_t within single quote 'a'
std::array<int, N> arr_len_[ comma separated values] arr5[1, 2, 3, 4, 5]
int [] carr_len_[ comma separated values] carr5[1, 2, 3, 4, 5]
std::deque<int> deq_len_ [comma separated values] deq5[1, 2, 3, 4, 5]
std::queue<int> qu_len_ [comma separated values] qu5[1, 2, 3, 4, 5]
std::list<int> lst_len_[comma separated values] lst5[1, 2, 3, 4, 5]
std::forward_list<int> flst_len_[comma separated values] flst5[1, 2, 3, 4, 5]
std::set<int> set_len_(comma separated values) set5(1, 2, 3, 4, 5)
std::multiset<int> mset_len_(comma separated values) mset5(1, 2, 3, 4, 5)
std::map<int, std::string> map_len_[python style dictionary] map4{1:"one", 2:"two", 3:"three", 4:"four"}
std::multimap<int, std::string> mmap_len_[python style dictionary] map4{1:"one", 1:"ekka", 2:"two", 2:"dui", 3:"three", 4:"four"}
std::pair<int, std::string> pr(comma separated values) pr(200, "two hundred")
tuple<int, std::string, char*, float> tp_len_(comma separated values) tp4(200, "two hundred", "make string", 2.3)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].