VBScript Tutorial
VBScript Advanced
VBScript Useful Resources
Selected Reading
- VBScript - Date
- VBScript - Arrays
- VBScript - Strings
- VBScript - Numbers
- VBScript - Cookies
- VBScript - Events
- VBScript - Loops
- VBScript - Decisions
- VBScript - Operators
- VBScript - Constants
- VBScript - Variables
- VBScript - Placement
- VBScript - Enabling
- VBScript - Syntax
- VBScript - Overview
- VBScript - Home
VBScript Advanced
- VBScript - Misc Statements
- VBScript - Error Handling
- VBScript - Reg Expressions
- VBScript - Object Oriented
- VBScript - Dialog Boxes
- VBScript - Procedures
VBScript Useful Resources
- VBScript - Discussion
- VBScript - Useful Resources
- VBScript - Quick Guide
- VBScript - Questions and Answers
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
VBScript - Strings
VBScript - Strings
Strings are a sequence of characters, which can consist of alphabets or numbers or special characters or all of them. A variable is said to be a string if it is enclosed within double quotes " ".
Syntax
variablename = "string"
Examples
str1 = "string" Only Alphabets str2 = "132.45" Only Numbers str3 = "!@#$;*" Only Special Characters Str4 = "Asc23@#" Has all the above
String Functions
There are predefined VBScript String functions, which help the developers to work with the strings very effectively. Below are String methods that are supported in VBScript. Please cpck on each one of the methods to know in detail.
Function Name | Description |
---|---|
Returns the first occurrence of the specified substring. Search happens from left to right. | |
Returns the first occurrence of the specified substring. Search happens from Right to Left. | |
Returns the lower case of the specified string. | |
Returns the Upper case of the specified string. | |
Returns a specific number of characters from the left side of the string. | |
Returns a specific number of characters from the Right side of the string. | |
Returns a specific number of characters from a string based on the specified parameters. | |
Returns a string after removing the spaces on the left side of the specified string. | |
Returns a string after removing the spaces on the right side of the specified string. | |
Returns a string value after removing both leading and traipng blank spaces. | |
Returns the length of the given string. | |
Returns a string after replacing a string with another string. | |
Fills a string with the specified number of spaces. | |
Returns an integer value after comparing the two specified strings. | |
Returns a String with a specified character the specified number of times. | |
Returns a String after reversing the sequece of the characters of the given string. |