用逗号连接字符串列表 [英] Join list of strings with a comma
本文介绍了用逗号连接字符串列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在学习ABAP。过去我使用python。
I am learning ABAP. In the past I used python.
Python: ', '.join(['one', 'two', 'three'])
Result: 'one, two, three'
我如何加入,
的字符串列表,并创建包含 1、2、3
的字符串?
How can I join a list of strings with ,
and create a string containing one, two, three
?
系统版本为740。
推荐答案
另一种编写 CONCATENATE LINES OF的方式...
将使用7.40函数 concat_lines_of([table =] itab [sep = sep])
Another way of writing CONCATENATE LINES OF ...
is to use the 7.40 function concat_lines_of( [table =] itab [sep = sep] )
cl_demo_output=>display( concat_lines_of(
table = value string_table( ( `one` ) ( `two` ) ( `three` ) )
sep = `, ` ) ).
(结果:一,二,三)
这篇关于用逗号连接字符串列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文