mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
While it is currently quite easy to implement such a property in the DSL directly (.mapcat on a String.array), an upcoming commit will introduce an opaque String type, making it much less convenient (replace a simple .mapcat with a recursive property). Since this feature is generally useful, just add a builtin property for it. TN: UA05-027
13 lines
317 B
Plaintext
13 lines
317 B
Plaintext
main.py: Running...
|
|
join([], '') = ''
|
|
join([], '|') = ''
|
|
join([''], '') = ''
|
|
join([''], '|') = ''
|
|
join(['a'], '') = 'a'
|
|
join(['a'], '|') = 'a'
|
|
join(['ab', 'cdef', '', 'g'], '') = 'abcdefg'
|
|
join(['ab', 'cdef', '', 'g'], '|') = 'ab|cdef||g'
|
|
join(['ab', 'cdef', '', 'g'], '<|>') = 'ab<|>cdef<|><|>g'
|
|
main.py: Done.
|
|
Done
|