Commit 0de328bb authored by Anton Bukov's avatar Anton Bukov

Update README.md

parent 33560a9f
boolinq 2.0 boolinq 2.0
======= =======
C++ header-only Ranges and LINQ template library C++ single-file header-only Ranges and LINQ template library
Just imagine LINQ support for STL/Qt collections :) Just imagine LINQ support for STL/Qt collections :)
Get source code here: **[boolinq.h](https://github.com/k06a/boolinq/blob/master/include/boolinq/boolinq.h)** Get source code here: **[boolinq.h](/include/boolinq/boolinq.h)**
###How it looks like? ###How it looks like?
####Example with integers ####Example with integers
``` ```c++
int src[] = {1,2,3,4,5,6,7,8}; int src[] = {1,2,3,4,5,6,7,8};
auto dst = from(src).where( [](int a){return a%2 == 1;}) // 1,3,5,7 auto dst = from(src).where( [](int a){return a%2 == 1;}) // 1,3,5,7
.select([](int a){return a*2;}) // 2,6,10,14 .select([](int a){return a*2;}) // 2,6,10,14
...@@ -24,7 +24,7 @@ auto dst = from(src).where( [](int a){return a%2 == 1;}) // 1,3,5,7 ...@@ -24,7 +24,7 @@ auto dst = from(src).where( [](int a){return a%2 == 1;}) // 1,3,5,7
####Example with structs ####Example with structs
``` ```c++
struct Man struct Man
{ {
std::string name; std::string name;
...@@ -51,7 +51,7 @@ auto dst = from(src).where( [](const Man & man){return man.age < 18;}) ...@@ -51,7 +51,7 @@ auto dst = from(src).where( [](const Man & man){return man.age < 18;})
####Interesting example ####Interesting example
``` ```c++
struct Message struct Message
{ {
std::string PhoneA; std::string PhoneA;
...@@ -86,7 +86,7 @@ int DenisUniqueContactCount = ...@@ -86,7 +86,7 @@ int DenisUniqueContactCount =
####Today: ####Today:
- cast<T>() - cast&lt;T&gt;()
- take(int) - take(int)
- skip(int) - skip(int)
- concat(range) - concat(range)
...@@ -119,22 +119,22 @@ int DenisUniqueContactCount = ...@@ -119,22 +119,22 @@ int DenisUniqueContactCount =
- toList() - toList()
- toDeque() - toDeque()
- toVector() - toVector()
- toContainer<T>() - toContainer&lt;T&gt;()
####Custom: ####Custom:
- bytes() - bytes()
- bytes<ByteOrder>() - bytes&lt;ByteOrder&gt;()
- unbytes<T>() - unbytes&lt;T&gt;()
- unbytes<T,ByteOrder>() - unbytes&lt;T,ByteOrder&gt;()
- bits() - bits()
- bits<BitOrder>() - bits&lt;BitOrder&gt;()
- bits<BitOrder,ByteOrder>() - bits&lt;BitOrder,ByteOrder&gt;()
- unbits() - unbits()
- unbits<BitOrder>() - unbits&lt;BitOrder&gt;()
- unbits<T>() - unbits&lt;T&gt;()
- unbits<T,BitOrder>() - unbits&lt;T,BitOrder&gt;()
- unbits<T,BitOrder,ByteOrder>() - unbits&lt;T,BitOrder,ByteOrder&gt;()
####Coming soon: ####Coming soon:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment