Skip to content

Add .contains example to doc #2133

Description

@pyramid3d

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!

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions