「VBScript入門」Trim、LTrim、RTrim関数の使い方
関数
Trim(strString) 両方のスペース削除
LTrim(strString) 末尾のスペース削除
RTrim(strString) 先頭のスペース削除
使用例
Dim strTarget1 Dim strTarget2 Dim strTarget3 strTarget1 = Trim(" Study skill in arkgame.com ") WScript.Echo strTarget1 & Len(strTarget1) strTarget2 = LTrim(" Study skill in arkgame.com ") WScript.Echo strTarget2 & Len(strTarget2) strTarget3 = RTrim(" Study skill in arkgame.com ") WScript.Echo strTarget3 & Len(strTarget2)
実行結果
Study skill in arkgame.com26 Study skill in arkgame.com 27 Study skill in arkgame.com27