summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-10-04 09:07:51 +0200
committerTyge Løvset <[email protected]>2021-10-04 09:07:51 +0200
commit35997591de5a448752734c822b0f1003e08853a5 (patch)
treee6252c64b71014feb10f3338f663d6d1ea7dfa3b /docs
parentd314fa40bcfc3a7d5e4dfc8136aebff309db8667 (diff)
downloadSTC-modified-35997591de5a448752734c822b0f1003e08853a5.tar.gz
STC-modified-35997591de5a448752734c822b0f1003e08853a5.zip
Fixed a small bug and simplified template.h
Diffstat (limited to 'docs')
-rw-r--r--docs/ccommon_api.md4
1 files changed, 1 insertions, 3 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md
index 5f31e572..902b33f5 100644
--- a/docs/ccommon_api.md
+++ b/docs/ccommon_api.md
@@ -122,16 +122,14 @@ c_forrange (i, int, 30, 0, -5) printf(" %d", i);
// 30 25 20 15 10 5
```
-### c_apply, c_apply_pair
+### c_apply, c_apply_pair, c_apply_n
**c_apply** will apply a method on an existing container with the given array elements:
```c
c_apply(cvec_i, push_back, &vec, {1, 2, 3}); // apply multiple push_backs
c_apply_pair(cmap_i, insert, &map, { {4, 5}, {6, 7} }); // inserts to existing map
int arr[] = {1, 2, 3};
-cmap_i_value_t arr2[] = { {4, 5}, {6, 7} };
c_apply_n(cvec_i, push_back, &vec, arr, c_arraylen(arr));
-c_apply_pair_n(cmap_i, insert, &map, arr2, c_arraylen(arr2));
```
### c_new, c_new_n, c_del, c_make