Windows Scripting
  Home arrow Windows Scripting arrow VBScript: Functioning with Strings
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

VBScript: Functioning with Strings
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 2
    2008-04-14

    Table of Contents:
  • VBScript: Functioning with Strings
  • Checking If It’s In With the InStr() Function
  • Using InStr() with Variables
  • Uppercase and Lowercase

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    VBScript: Functioning with Strings
    (Page 1 of 4 )

    In this continuing series on VBScript functions, I will cover the string functions. In the past, we went over date, time, and array functions. There are not quite as many built-in string functions in the language as there are date/time functions, but what it lacks in quantity, it more than makes up for in quality.

    So enough blabbering on about it. Take a look at the following table, admire the cold black borders, the bold text, and most importantly, the archaic definitions, which are sure to baffle your feeble minds.


    Function

    What It Does

    InStr

    Used to return the position of the first occurrence of a string within another string.

    InStrRev

    Same as InStr only it begins searching from the last character of the string.

    LCase

    Takes a string and converts it to lower case.

    UCase

    Takes a string and converts it to upper case.

    Left

    Used to return a number of characters you specify from the left side of a string.

    Right

    Used to return a number of characters you specify from the right side of a string.

    Mid

    Used to return a number of characters you specify from a string.

    Len

    Used to return the number of characters in a string.

    LTrim

    Used to remove spaces from the left side of a string.

    RTrim

    Used to remove spaces from the right side of a string.

    Trim

    Used to remove spaces from both the left and right side of a string.

    Replace

    Used to replace a part of a string with another string the number of times you specify

    Space

    Used to return a string made up of a number of spaces you specify.

    StrComp

    Used to compare two strings. Returns a value representing the results.

    StrReverse

    Used to reverse a string.

    String

    Used to return a string that repeats a character the number of times you specify.

    More Windows Scripting Articles
    More By James Payne


       · You should have included the LIKE function. This function gives developers a...
       · Hey, thanks for the suggestion. I'll actually be doing an article on regex soon, and...
     

    WINDOWS SCRIPTING ARTICLES

    - VBScript: Array Functions
    - VBScript: Strings, You Can`t Function withou...
    - VBScript: More String Functions
    - VBScript: Functioning with Strings
    - Working with the Windows Registry in C++
    - Understanding Objects
    - HTML Applications: Giving WSH a User Interfa...
    - Modifying Computer Objects with Active Direc...
    - Logon Script to Send Email Notifications
    - Securing Computers and Active Directory
    - Moving and Renaming Computers with Active Di...
    - Working with System Processes in WSH
    - Active Directory and Computers
    - WCF and Proxies
    - Metadata and WCF Essentials




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway