StrComp Function
- 업데이트 날짜:2025-07-21
- 1분 (읽기 시간)
StrComp Function
Syntax
Number StrComp(String stringA, String stringB, Number compareOption = 0, Number maxChars = -1)
Return Value
A number less than 0 if the first string is less than the second. A number greater than 0 if the first string is greater than the second. 0 if the strings are equal.
Purpose
This function compares two strings.
Parameters
stringA as String
The first string to compare.
stringB as String
The second string to compare.
compareOption as Number
An optional number that specifies how to compare the strings. Pass 0 for a case-sensitive comparison (this is the default). Pass 1 for a case-insensitive comparison.
maxChars as Number
An optional number that specifies the maximum number of characters to compare. Pass -1 to compare all characters (this is the default).