abap 字符串截取和替换

str =  'helloworld'.

截取:

str1 = str+0(5). "此时str1的值为'hello'

str2 = str+5(5). "此时str2的值为'world'

str3 = str(5). "此时str1的值为'hello'

替换:

str0 = 'hello'.

str4 = str.

str4+5(5) = str0."此时str4的值为'hellohello'

获取长度:

strlen( str )."strlen( str )的值为10


发布了22 篇原创文章 · 获赞 8 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/csucoder_zone/article/details/79359724