diff options
| author | Tyge Løvset <[email protected]> | 2021-03-15 16:08:14 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-03-15 16:08:14 +0100 |
| commit | 779b2b9ff0223135396989b7abb5825a9e0e1e8e (patch) | |
| tree | b6621cfc047d9a043e5a117ee0a8af4d33064513 /docs | |
| parent | 4b3e75cd8f078380c98e037c861f7d771af76f91 (diff) | |
| download | STC-modified-779b2b9ff0223135396989b7abb5825a9e0e1e8e.tar.gz STC-modified-779b2b9ff0223135396989b7abb5825a9e0e1e8e.zip | |
Added csmap_X_lower_bound() method (find >= key). Updated docs a little.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/cmap_api.md | 4 | ||||
| -rw-r--r-- | docs/csmap_api.md | 7 | ||||
| -rw-r--r-- | docs/cstr_api.md | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 06f2c987..593f78ab 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -61,16 +61,16 @@ size_t cmap_X_bucket_count(cmap_X map); cmap_X_iter_t cmap_X_find(const cmap_X* self, RawKey rkey); bool cmap_X_contains(const cmap_X* self, RawKey rkey); +cmap_X_mapped_t* cmap_X_at(const cmap_X* self, RawKey rkey); // rkey must be in map. cmap_X_result_t cmap_X_insert(cmap_X* self, Key key, Mapped mapped); // no change if key in map cmap_X_result_t cmap_X_insert_or_assign(cmap_X* self, Key key, Mapped mapped); // always update mapped cmap_X_result_t cmap_X_put(cmap_X* self, Key key, Mapped mapped); // alias for insert_or_assign + cmap_X_result_t cmap_X_emplace(cmap_X* self, RawKey rkey, RawMapped rmapped); // no change if rkey in map cmap_X_result_t cmap_X_emplace_or_assign(cmap_X* self, RawKey rkey, RawMapped rmapped); // always update rmapped void cmap_X_emplace_n(cmap_X* self, const cmap_X_rawvalue_t arr[], size_t size); -cmap_X_mapped_t* cmap_X_at(const cmap_X* self, RawKey rkey); // rkey must be in map. - size_t cmap_X_erase(cmap_X* self, RawKey rkey); cmap_X_iter_t cmap_X_erase_at(cmap_X* self, cmap_X_iter_t pos); void cmap_X_erase_entry(cmap_X* self, cmap_X_value_t* entry); diff --git a/docs/csmap_api.md b/docs/csmap_api.md index d314958e..4b8f058a 100644 --- a/docs/csmap_api.md +++ b/docs/csmap_api.md @@ -55,18 +55,19 @@ bool csmap_X_empty(csmap_X map); size_t csmap_X_size(csmap_X map); csmap_X_iter_t csmap_X_find(const csmap_X* self, RawKey rkey); -csmap_X_value_t* csmap_X_find_it(const csmap_X* self, RawKey rkey, csmap_X_iter_t* out); // return NULL if not found +csmap_X_iter_t csmap_X_lower_bound(const csmap_X* self, RawKey rkey); // find closest entry >= rkey bool csmap_X_contains(const csmap_X* self, RawKey rkey); +csmap_X_value_t* csmap_X_find_it(const csmap_X* self, RawKey rkey, csmap_X_iter_t* out); // return NULL if not found +csmap_X_mapped_t* csmap_X_at(const csmap_X* self, RawKey rkey); // rkey must be in map. csmap_X_result_t csmap_X_insert(csmap_X* self, Key key, Mapped mapped); // no change if key in map csmap_X_result_t csmap_X_insert_or_assign(csmap_X* self, Key key, Mapped mapped); // always update mapped csmap_X_result_t csmap_X_put(csmap_X* self, Key key, Mapped mapped); // alias for insert_or_assign + csmap_X_result_t csmap_X_emplace(csmap_X* self, RawKey rkey, RawMapped rmapped); // no change if rkey in map csmap_X_result_t csmap_X_emplace_or_assign(csmap_X* self, RawKey rkey, RawMapped rmapped); // always update rmapped void csmap_X_emplace_n(csmap_X* self, const csmap_X_rawvalue_t arr[], size_t size); -csmap_X_mapped_t* csmap_X_at(const csmap_X* self, RawKey rkey); // rkey must be in map. - size_t csmap_X_erase(csmap_X* self, RawKey rkey); csmap_X_iter_t csmap_X_erase_at(csmap_X* self, csmap_X_iter_t pos); diff --git a/docs/cstr_api.md b/docs/cstr_api.md index 7a483370..e528aafb 100644 --- a/docs/cstr_api.md +++ b/docs/cstr_api.md @@ -42,7 +42,7 @@ cstr* cstr_assign_n(cstr* self, const char* str, size_t n); cstr* cstr_append(cstr* self, const char* str); cstr* cstr_append_s(cstr* self, cstr s); -cstr* cstr_append_n(cstr* self, const char* str, size_t n); // appends len characters +cstr* cstr_append_n(cstr* self, const char* str, size_t n); // appends len characters void cstr_insert(cstr* self, size_t pos, const char* str); void cstr_insert_s(cstr* self, size_t pos, cstr s); @@ -51,6 +51,7 @@ void cstr_insert_n(cstr* self, size_t pos, const char* str, size_t n); void cstr_replace(cstr* self, size_t pos, size_t len, const char* str); void cstr_replace_s(cstr* self, size_t pos, size_t len, cstr s); void cstr_replace_n(cstr* self, size_t pos, size_t len, const char* str, size_t n); + void cstr_erase(cstr* self, size_t pos); void cstr_erase_n(cstr* self, size_t pos, size_t n); |
