IT. Expert System.

VBS

StrComp()


Description

The StrComp() function compares two strings and returns a value that represents the result of the comparison.

The StrComp() function can return one of the following values:

  • -1 (if string1 < string2)
  • 0 (if string1 = string2)
  • 1 (if string1 > string2)
  • Null (if string1 or string2 is Null)

This function has the form:

StrComp(string1,string2 [,compare])
Parameter Description
string1 (required) A string expression
string2 (required) A string expression
compare (optional) Specifies the string comparison to use (default = 0)

This parameter can have one of the following values:
  • 0 = vbBinaryCompare - Perform a binary comparison
  • 1 = vbTextCompare - Perform a textual comparison

Examples

The following examples show the basic use of this function:

Example 1

Msgbox(StrComp("VBScript","VBScript"))

This produces the following result:

0

Example 3

Msgbox(StrComp("VBScript","vbscript"))

This produces the following result:

-1

Example 3

Msgbox(StrComp("VBScript","vbscript",1))

This produces the following result:

0

Miscellaneous Information

Supported in Version: 1.0


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1388 / . Delta: 0.03816 с