Compare commits

...

2 Commits

Author SHA1 Message Date
ea6c20f430 str_expand fix 2025-11-27 01:44:49 +05:00
77e4f38416 updated README.md 2025-11-27 01:38:50 +05:00
2 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,10 @@ C library with collections, strings, exceptions, io...
git clone https://timerix.ddns.net/git/Timerix/tlibc.git git clone https://timerix.ddns.net/git/Timerix/tlibc.git
``` ```
2. Install [cbuild](https://timerix.ddns.net/git/Timerix/cbuild) version specified in `project.config`. 2. Install [cbuild](https://timerix.ddns.net/git/Timerix/cbuild/releases).
Select latest version compatible with the one in `project.config`.
Example: For `2.3.0` download latest `2.3.x`.
3. Build static library 3. Build static library
``` ```

View File

@ -19,7 +19,7 @@ str s = STR("something");
printf(FMT_str"\n", str_expand(s)); printf(FMT_str"\n", str_expand(s));
*/ */
#define FMT_str "%.*s" #define FMT_str "%.*s"
#define str_expand(s) s.len, s.data #define str_expand(S) (S).len, (S).data
/// creates str from a string literal /// creates str from a string literal
#define STR(LITERAL) str_construct(LITERAL, ARRAY_LEN(LITERAL) - 1, true) #define STR(LITERAL) str_construct(LITERAL, ARRAY_LEN(LITERAL) - 1, true)