diff options
| author | Tyge Løvset <[email protected]> | 2021-05-20 11:19:37 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-05-20 11:19:37 +0200 |
| commit | 6270e01be0f105e3512cfde04a7f7d6b67aa8a2e (patch) | |
| tree | f2dc00ef74dff377c3c2ed1d85e9a7dcaf42e5bf /docs/cstr_api.md | |
| parent | 9c5d58627c784bc123e96fb81587f71994ad26cc (diff) | |
| download | STC-modified-6270e01be0f105e3512cfde04a7f7d6b67aa8a2e.tar.gz STC-modified-6270e01be0f105e3512cfde04a7f7d6b67aa8a2e.zip | |
Changed new API: c_sv(literal) => c_sv(cstr), cstr_new(literal) => cstr_lit(literal), csview_new() => csview_lit(). Added c_lit(literal) alias to csview_lit(literal).
Diffstat (limited to 'docs/cstr_api.md')
| -rw-r--r-- | docs/cstr_api.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/cstr_api.md b/docs/cstr_api.md index a2b23a70..094f41e0 100644 --- a/docs/cstr_api.md +++ b/docs/cstr_api.md @@ -16,7 +16,7 @@ All cstr definitions and prototypes are available by including a single header f ```c cstr cstr_init(void); // constructor; same as cstr_null. -cstr cstr_new(const char literal_only[]); // cstr from literal; no strlen(). +cstr cstr_lit(const char literal_only[]); // cstr from literal; no strlen(). cstr cstr_from(const char* str); // constructor using strlen() cstr cstr_from_n(const char* str, size_t n); // constructor with specified length cstr cstr_with_capacity(size_t cap); @@ -120,7 +120,7 @@ char* c_strncasestrn(const char* str, const char* needle, size_t slen, si #include <stc/cstr.h> int main() { - cstr s0 = cstr_new("Initialization without using strlen()."); + cstr s0 = cstr_lit("Initialization without using strlen()."); printf("%s\nLength: %zu\n\n", s0.str, cstr_size(s0)); cstr s1 = cstr_from("one-nine-three-seven-five."); |
