code / tomo

Lines41.3K C23.7K Markdown9.7K YAML5.0K Tomo2.3K
7 others 763
Python231 Shell230 make212 INI47 Text21 SVG16 Lua6
(35 lines)
1 CString.as_text:
2 short: convert a C string to Text
3 description: >
4 Convert a C string to Text.
5 return:
6 type: 'Text'
7 description: >
8 The C string as a Text.
9 args:
10 str:
11 type: 'CString'
12 description: >
13 The C string.
14 example: |
15 assert CString("Hello").as_text() == "Hello"
17 CString.join:
18 short: join a list of C strings
19 description: >
20 Join a list of C strings together with a separator.
21 return:
22 type: 'CString'
23 description: >
24 A C string of the joined together bits.
25 args:
26 glue:
27 type: 'CString'
28 description: >
29 The C joiner used to between elements.
30 pieces:
31 type: '[CString]'
32 description: >
33 A list of C strings to join.
34 example: |
35 assert CString(",").join([CString("a"), CString("b")]) == CString("a,b")