1.SEARCH搜索指定字符串 REPORT Z_CHAR. ). MOVE 'Welcom to sap world!' to str. SEARCH str for 'sap'. 如果查找成功sy-subrc = 0,sy-fdpos表表示所查找的内容在字符串中开始位置. 2.字符串截取 ) VALUE 'Welcom to sap world!'. ) TYPE c. cutstr = str(). "直接截取第10位字母 cutstr = str+(). "从第五位开始截取10
print 函数的打印格式: ##no quote print out > x <- letters[1:5] > print(x,quote=F,);print(x,quote=T) [1] a b c d e [1] "a" "b" "c" "d" "e" ##print without number of vector and quote > cat(x) a b c d e
1.使用js去掉字符串中的所有空格 1.1.定义一个去空格函数方法 function Trim(str,is_global){ var result; result = str.replace(/(^\s+)|(\s+$)/g,""); if(is_global.toLowerCase()=="g") { result = result.replace(/\s/g,""); } return result; } 1.2. 使用此方法去空格,如下