diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-18 19:02:07 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-18 19:02:07 -0400 |
| commit | 5bdf96234a388cbd3854747b0667620ebb60ccdf (patch) | |
| tree | e4ab4055e0190f4a080b69fcd933cd8ca6146260 /api/c_strings.yaml | |
| parent | 82e3c05d547b2372ca4033c68469479260092b5a (diff) | |
Improved CLI parsing and add CString.join()
Diffstat (limited to 'api/c_strings.yaml')
| -rw-r--r-- | api/c_strings.yaml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/api/c_strings.yaml b/api/c_strings.yaml new file mode 100644 index 00000000..7607bc9e --- /dev/null +++ b/api/c_strings.yaml @@ -0,0 +1,35 @@ +CString.as_text: + short: convert a C string to Text + description: > + Convert a C string to Text. + return: + type: 'Text' + description: > + The C string as a Text. + args: + str: + type: 'CString' + description: > + The C string. + example: | + assert CString("Hello").as_text() == "Hello" + +CString.join: + short: join a list of C strings + description: > + Join a list of C strings together with a separator. + return: + type: 'CString' + description: > + A C string of the joined together bits. + args: + glue: + type: 'CString' + description: > + The C joiner used to between elements. + pieces: + type: '[CString]' + description: > + A list of C strings to join. + example: | + assert CString(",").join([CString("a"), CString("b")]) == CString("a,b") |
