Windows Scripting
  Home arrow Windows Scripting arrow VBScript: Strings, You Can`t Function with...
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: Strings, You Can`t Function without Them
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-04-28

    Table of Contents:
  • VBScript: Strings, You Can`t Function without Them
  • LTrim That Hair You Hippie!
  • Trim()ming the Fat
  • Comparing Strings
  • The String Function
  • StrReverse()

  • 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

    Ajax Application Generator Generate database 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: Strings, You Can`t Function without Them
    (Page 1 of 6 )

    Welcome back to the third, and hopefully final, chapter in our series on VBScript string functions. So far we have covered nine of the sixteen built-in string functions available. In this article, with any luck, we will get to the remaining seven. So strap in, we have a lot of ground to cover.

    Among those covered were the InStr() and InStrRev(), which allowed us to test whether a character or string was contained within another string, and the LCase() and UCase(), which converted strings to lowercase and uppercase respectively. After that we discussed the Right(), Left(), and Mid() functions, which let us, for lack of a better term, parse out a section of a string. Finally, we covered Len(), which counted the number of characters in a string.

    Here and now, we will take a heartbreaking last look at our dear friend the String Function Table, and then learn about the next subject on the block, the Trim() functions. So get out your razors and shaving cream, and get prepared to lose that precious peach fuzz you call a mustache.


    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 lowercase

    UCase

    Takes a string and converts it to uppercase

    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 a 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 a number of times you specify

    More Windows Scripting Articles
    More By James Payne


       · Thanks for stopping by to read my article on String functions in VBScript. Here we...
     

    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

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




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