如何在字符串中加入回车换行,tab字符
3个回答
2016-01-18
展开全部
CL_ABAP_CHAR_UTILITIES 中有字符常量:如:CR_LF,HORIZONTAL_TAB,NEWLINE等等.
下面给出字符串中加入回车换行的示例:
DATA: crlf(2) TYPE c.
DATA: l_html(4096) TYPE C.
crlf = cl_ABAP_char_utilities=cr_lf.
CONCATENATE l_html crlf '_FUNCTION''30''WWW_GET_REPORT' '' INTO l_html.
string的标准函数查找:FIND [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN dobj替换:REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN dobj WITH new
REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new移动:SHIFT c [BY n PLACES] [mode]拼接:CONCATENATE c1 ... cn INTO c [SEPARATED BY s]分割:SPLIT c AT del INTO c1 ... cn.
大小写转换:
TRANSLATE text TO UPPER CASE.
TRANSLATE text TO LOWER CASE.
字符串覆盖:
OVERLAY c1 WITH c2 [ONLY str].
压缩字符串:
下面给出字符串中加入回车换行的示例:
DATA: crlf(2) TYPE c.
DATA: l_html(4096) TYPE C.
crlf = cl_ABAP_char_utilities=cr_lf.
CONCATENATE l_html crlf '_FUNCTION''30''WWW_GET_REPORT' '' INTO l_html.
string的标准函数查找:FIND [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN dobj替换:REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN dobj WITH new
REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new移动:SHIFT c [BY n PLACES] [mode]拼接:CONCATENATE c1 ... cn INTO c [SEPARATED BY s]分割:SPLIT c AT del INTO c1 ... cn.
大小写转换:
TRANSLATE text TO UPPER CASE.
TRANSLATE text TO LOWER CASE.
字符串覆盖:
OVERLAY c1 WITH c2 [ONLY str].
压缩字符串:
2016-01-23 · 做真实的自己 用良心做教育
千锋教育
千锋教育专注HTML5大前端、JavaEE、Python、人工智能、UI&UE、云计算、全栈软件测试、大数据、物联网+嵌入式、Unity游戏开发、网络安全、互联网营销、Go语言等培训教育。
向TA提问
关注
展开全部
字符串中加入回车换行的示例:
DATA: crlf(2) TYPE c.
DATA: l_html(4096) TYPE C.
crlf = cl_ABAP_char_utilities=>cr_lf.
CONCATENATE l_html crlf '_FUNCTION'
'30'
'WWW_GET_REPORT' '>' INTO l_html.
string的标准函数
查找: FIND [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN dobj
替换: REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN dobj WITH new
REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new
移动:SHIFT c [BY n PLACES] [mode]
拼接:CONCATENATE c1 ... cn INTO c [SEPARATED BY s]
分割:SPLIT c AT del INTO c1 ... cn.
大小写转换:TRANSLATE text TO UPPER CASE.
TRANSLATE text TO LOWER CASE.
字符串覆盖:OVERLAY c1 WITH c2 [ONLY str].
压缩字符串:CONDENSE c [NO-GAPS].
系统扩张的string函数(函数组CSTR)
STRING_LENGTH
STRING_CONCATENATE
STRING_MOVE_RIGHT
STRING_REVERSE
STRING_SPLIT
STRING_CENTER
TEXT_SPLIT
STRING_SPLIT_AT_POSITION
OVERLAY_BYTE
SJIS_SBC_TO_DBC
SJIS_DBC_TO_SBC
DATA: crlf(2) TYPE c.
DATA: l_html(4096) TYPE C.
crlf = cl_ABAP_char_utilities=>cr_lf.
CONCATENATE l_html crlf '_FUNCTION'
'30'
'WWW_GET_REPORT' '>' INTO l_html.
string的标准函数
查找: FIND [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN dobj
替换: REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] pattern IN dobj WITH new
REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new
移动:SHIFT c [BY n PLACES] [mode]
拼接:CONCATENATE c1 ... cn INTO c [SEPARATED BY s]
分割:SPLIT c AT del INTO c1 ... cn.
大小写转换:TRANSLATE text TO UPPER CASE.
TRANSLATE text TO LOWER CASE.
字符串覆盖:OVERLAY c1 WITH c2 [ONLY str].
压缩字符串:CONDENSE c [NO-GAPS].
系统扩张的string函数(函数组CSTR)
STRING_LENGTH
STRING_CONCATENATE
STRING_MOVE_RIGHT
STRING_REVERSE
STRING_SPLIT
STRING_CENTER
TEXT_SPLIT
STRING_SPLIT_AT_POSITION
OVERLAY_BYTE
SJIS_SBC_TO_DBC
SJIS_DBC_TO_SBC
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
看语言,语言不同写法不同。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询