Unicode組み込みファンクション - RightAdjustメソッド
文字列を右に調整
Unicode組み込みファンクション (PRIM_LIBI.IUnicodeIntrinsics) のメンバ
パラメータ
名前 | タイプ | データタイプ | 記述 |
|---|---|---|---|
Result | *Result (任意) | Unicode 文字列 | 右調整の結果 |
Length | *Input (任意) | 整数 | 右調整の幅(バイト) |
Pad | *Input (任意) | Unicode 文字列 | 結果内のブランクを置き換える埋め込み文字 |
詳細
RightAdjust は、文字列の値を、 Length パラメータで指定された長さまたは文字列の長さのいずれか短い長さの分だけ右に移動します。値の左側は、 Pad パラメータで指定された文字で埋められます。 Pad パラメータが指定されていない場合は、ブランクで埋められます。
例
次の 2 つのフィールド定義を使用する
define field(#source) type(*string) length(10)
define field(#target) type(*string) length(10)
この例では、 #target は "abc" に設定されます。
#source := "abc"
#target := #source.RightAdjust
この例では、 #target は "xxabc" に設定されます。
#source := "abc"
#target := #source.RightAdjust( 5, "x" )