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.
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.
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.
RTrim is used to trim/remove the spaces from the right-hand side of the specified String.
❮ Complete VBScript Reference. The Len function returns the number of characters in a string.
You can use
MyString = Mid(First_String, 5)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With