Rexx - 左側字串



此方法返回字串左側的特定數量的字元。

語法

left(str,count) 

引數

  • str − 源字串。

  • count − 從字串左側返回的字元數。

返回值

此方法返回字串左側的特定數量的字元。

示例

/* Main program */ 
a = "Hello World" 
say left(a,5) 

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

輸出

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