Rexx - justify() 方法
该方法用于根据长度值添加对齐或修剪字符串的值。
语法
justify(string,length)
参数
String − 需要进行调整的字符串值。
Length − 合理的值。
返回值
返回对齐的字符串值。
示例
/* 主程序 */
options arexx_bifs
say justify('This is a tutorial',14)
当我们运行上面的程序时,我们将得到以下结果。
输出
This is a tuto
该方法用于根据长度值添加对齐或修剪字符串的值。
justify(string,length)
String − 需要进行调整的字符串值。
Length − 合理的值。
返回对齐的字符串值。
/* 主程序 */
options arexx_bifs
say justify('This is a tutorial',14)
当我们运行上面的程序时,我们将得到以下结果。
This is a tuto
