Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

StrComp

The StrComp function does a comparison of two strings to see if they are identical. You can specify whether you want to do a binary comparison (case-sensative) or a textual comparison (case-insensative). The function returns true if the strings are identical and false if they are not.

With a binary comparison, the strings "Cat" and "cat" will not be identical because the case of the letters do not match. However, if you were to do a textual comparison, the strings would match. By default the StrComp function does binary comparison.

Const sStr1 = "Cat"
Const sStr2 = "cat"

Response.Write "Binary Comp: " & StrComp(sStr1, sStr2, vbBinaryCompare) & "<BR>"
Response.Write "Textual Comp: " & StrComp(sStr1, sStr2, vbTextualCompare) & "<BR>"
Response.Write "Default Comp: " & StrComp(sStr1, sStr2) & "<BR>"

Orvado, San Diego Web Design

ASP Nuke CMS
Free Open Source
Content Manager
GoSwap Auctions
Buy, Sell
No Fees!

Contact Us | Contribute | About | Site Map



"f u cn rd ths, u cn gt a gd jb n cmptr prgmmng." - Anon

©2012 San Diego Web Design - Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.