文字列を他の文字列に挿入します。
#Include <String.au3>
_StringInsert($s_String, $s_InsertString, $i_Position)
パラメータ
| $s_String | 元の文字列 |
| $s_InsertString | 挿入する文字列 |
| $i_Position | 文字列挿入位置(負の値は右側からの位置になります) |
返し値
| 成功: | 更新後の文字列が返されます |
| 失敗: | 元の文字列が返され、@errorを設定します |
| @Error: | 1 - 元の文字列が空 |
| 2 - 挿入文字列が空 | |
| 3 - 無効な位置 |
注意
右側から文字列を挿入する場合は位置に負の値を使用してください。
関連
例
#include<string.au3>
; 3つの"動く"下線を挿入し、コンソールに表示
For $i_loop = -20 To 20
ConsoleWrite($i_loop & @TAB & _StringInsert ("Supercalifragilistic", "___", $i_loop) & @CRLF)
Next