Rexx - 字串子串



此方法從特定字串中獲取子字串。

語法

substr(string1,index,count) 

引數

  • string1 − 源字串。

  • index − 子字串的起始索引位置。

  • count − 子字串的字元數。

返回值

返回子字串。

示例

/* Main program */ 
a = "Hello World" 
say substr(a,2,3) 

執行以上程式後,將得到以下結果。

輸出

ell 
rexx_strings.htm
廣告
© . All rights reserved.