Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Do I Use VBScript to Strip the First n Characters of a String?

Tags:

vbscript

How do I use VBScript to strip the first four characters of a string?

So that the first four characters are no longer part of the string.

like image 767
JoJo Avatar asked Nov 30 '11 13:11

JoJo


People also ask

How do I remove the first 3 characters from a string?

Use the String. substring() method to remove the first N characters from a string, e.g. const result = str. substring(N) . The substring method will return a new string that doesn't contain the first N characters of the original string.

What is InStr function in VBScript?

The InStr function returns the position of the first occurrence of one string within another. The InStr function can return the following values: If string1 is "" - InStr returns 0. If string1 is Null - InStr returns Null. If string2 is "" - InStr returns start.

How will you trim the spaces on the right of a string using VBScript?

RTrim is used to trim/remove the spaces from the right-hand side of the specified String.

What is Len in VBScript?

❮ Complete VBScript Reference. The Len function returns the number of characters in a string.


1 Answers

You can use

MyString = Mid(First_String, 5)
like image 87
Marco Avatar answered Oct 17 '22 02:10

Marco