Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .contains example to doc #2133

Closed
pyramid3d opened this issue May 24, 2020 · 1 comment
Closed

Add .contains example to doc #2133

pyramid3d opened this issue May 24, 2020 · 1 comment

Comments

@pyramid3d
Copy link

In the readme STL-like access section, there already is:

// find an entry
if (o.find("foo") != o.end()) {
  // there is an entry with key "foo"
}

Sometimes we just want to check if an entry is there.
For this .contains() is so much easier to read.
Please do add this example too:

// check if entry exists
if (o.contains("foo")) {
  // there is an entry with key "foo"
}

On a side note: great work! This library is facile to use and makes one's programming life much easier and much more fun! thanks for this library and your effort!

@pyramid3d
Copy link
Author

Great! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants