StringSegment.Compare(StringSegment, StringSegment, StringComparison) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares substrings of two specified StringSegment objects using the specified rules, and returns an integer that indicates their relative position in the sort order.
public:
static int Compare(Microsoft::Extensions::Primitives::StringSegment a, Microsoft::Extensions::Primitives::StringSegment b, StringComparison comparisonType);
public static int Compare (Microsoft.Extensions.Primitives.StringSegment a, Microsoft.Extensions.Primitives.StringSegment b, StringComparison comparisonType);
static member Compare : Microsoft.Extensions.Primitives.StringSegment * Microsoft.Extensions.Primitives.StringSegment * StringComparison -> int
Public Shared Function Compare (a As StringSegment, b As StringSegment, comparisonType As StringComparison) As Integer
Parameters
The first StringSegment to compare.
The second StringSegment to compare.
- comparisonType
- StringComparison
One of the enumeration values that specifies the rules for the comparison.
Returns
A 32-bit signed integer indicating the lexical relationship between the two comparands.
The value is negative if a
is less than b
, 0 if the two comparands are equal,
and positive if a
is greater than b
.
.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기