طريقة System::Globalization::CompareInfo::Compare

CompareInfo::Compare(const String&, const String&, CompareOptions) const method

يقارن السلاسل. يدعم فقط أوضاع Ordinal و OrdinalIgnoreCase.

virtual int System::Globalization::CompareInfo::Compare(const String &a, const String &b, CompareOptions options) const
ParameterTypeالوصف
aconst String&سلسلة LHS.
bconst String&سلسلة RHS.
optionsCompareOptionsنوع مقارنة String.

ReturnValue

قيمة سلبية إذا كانت سلسلة LHS تسبق سلسلة RHS، صفر إذا كانت متطابقة، قيمة إيجابية وإلا.

انظر أيضًا

CompareInfo::Compare(const String&, const String&) const method

يقارن السلاسل. غير مُنفَّذ.

virtual int System::Globalization::CompareInfo::Compare(const String &string1, const String &string2) const
ParameterTypeالوصف
string1const String&سلسلة LHS.
string2const String&سلسلة RHS.

ReturnValue

قيمة سلبية إذا كانت سلسلة LHS تسبق سلسلة RHS، صفر إذا كانت متطابقة، قيمة إيجابية وإلا.

انظر أيضًا

CompareInfo::Compare(const String&, int, const String&, int) const method

يقارن الجزء النهائي من سلسلة واحدة مع الجزء النهائي من السلسلة الثانية. غير مُنفَّذ.

virtual int System::Globalization::CompareInfo::Compare(const String &string1, int offset1, const String &string2, int offset2) const
ParameterTypeالوصف
string1const String&السلسلة الأولى.
offset1intفهرس البداية للأحرف في string1.
string2const String&السلسلة الثانية.
offset2intفهرس البداية للأحرف في string2.

ReturnValue

قيمة سالبة إذا كان قسم السلسلة الأول يسبق قسم السلسلة الثاني، صفر إذا كانا متطابقين، قيمة موجبة خلاف ذلك.

انظر أيضًا

CompareInfo::Compare(const String&, int, const String&, int, CompareOptions) const method

يقارن الجزء النهائي من سلسلة واحدة مع الجزء النهائي من السلسلة الثانية باستخدام طرق مقارنة السلاسل. غير مُنفَّذ.

virtual int System::Globalization::CompareInfo::Compare(const String &string1, int offset1, const String &string2, int offset2, CompareOptions options) const
ParameterTypeالوصف
string1const String&السلسلة الأولى.
offset1intفهرس البداية للأحرف في string1.
string2const String&السلسلة الثانية.
offset2intفهرس البداية للأحرف في string2.
optionsCompareOptionsString خيارات المقارنة.

ReturnValue

قيمة سالبة إذا كان قسم السلسلة الأول يسبق قسم السلسلة الثاني، صفر إذا كانا متطابقين، قيمة موجبة خلاف ذلك.

انظر أيضًا

CompareInfo::Compare(const String&, int, int, const String&, int, int) const method

يقارن جزءًا من سلسلة واحدة مع جزء من السلسلة الثانية. غير مُنفَّذ.

virtual int System::Globalization::CompareInfo::Compare(const String &string1, int offset1, int length1, const String &string2, int offset2, int length2) const
ParameterTypeالوصف
string1const String&السلسلة الأولى.
offset1intفهرس البداية للأحرف في string1.
length1intعدد الأحرف في string1 للمقارنة.
string2const String&السلسلة الثانية.
offset2intفهرس البداية للأحرف في string2.
length2intعدد الأحرف في string2 للمقارنة.

ReturnValue

قيمة سالبة إذا كان قسم السلسلة الأول يسبق قسم السلسلة الثاني، صفر إذا كانا متطابقين، قيمة موجبة خلاف ذلك.

انظر أيضًا

CompareInfo::Compare(const String&, int, int, const String&, int, int, CompareOptions) const method

يقارن جزءًا من سلسلة واحدة مع جزء من السلسلة الثانية باستخدام طرق مقارنة السلاسل. غير مُنفَّذ.

virtual int System::Globalization::CompareInfo::Compare(const String &string1, int offset1, int length1, const String &string2, int offset2, int length2, CompareOptions options) const
ParameterTypeالوصف
string1const String&السلسلة الأولى.
offset1intفهرس البداية للأحرف في string1.
length1intعدد الأحرف في string1 للمقارنة.
string2const String&السلسلة الثانية.
offset2intفهرس البداية للأحرف في string2.
length2intعدد الأحرف في string2 للمقارنة.
optionsCompareOptionsString خيارات المقارنة.

ReturnValue

قيمة سالبة إذا كان قسم السلسلة الأول يسبق قسم السلسلة الثاني، صفر إذا كانا متطابقين، قيمة موجبة خلاف ذلك.

انظر أيضًا