طريقة System::String::Compare

String::Compare(const String&, const String&, bool, const SharedPtr<System::Globalization::CultureInfo>&) method

يقارن أقل-يساوي-أكبر بين سلسلتين.

static int System::String::Compare(const String &strA, const String &strB, bool ignoreCase, const SharedPtr<System::Globalization::CultureInfo> &ci)
ParameterTypeالوصف
strAconst String&السلسلة الأولى للمقارنة.
strBconst String&السلسلة الثانية للمقارنة.
ignoreCaseboolيحدد ما إذا كان المقارنة غير حساسة لحالة الأحرف.
ciconst SharedPtr<System::Globalization::CultureInfo>&الثقافة المستخدمة للمقارنة.

ReturnValue

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

انظر أيضًا

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

يقارن أقل-يساوي-أكبر بين سلسلتين.

static int System::String::Compare(const String &strA, const String &strB, bool ignoreCase=false)
ParameterTypeالوصف
strAconst String&السلسلة الأولى للمقارنة.
strBconst String&السلسلة الثانية للمقارنة.
ignoreCaseboolيحدد ما إذا كان المقارنة غير حساسة لحالة الأحرف.

ReturnValue

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

انظر أيضًا

String::Compare(const String&, const String&, System::StringComparison) method

يقارن أقل-يساوي-أكبر بين سلسلتين.

static int System::String::Compare(const String &strA, const String &strB, System::StringComparison comparison_type)
ParameterTypeالوصف
strAconst String&السلسلة الأولى للمقارنة.
strBconst String&السلسلة الثانية للمقارنة.
comparison_typeSystem::StringComparisonComparison وضع.

ReturnValue

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

انظر أيضًا

String::Compare(const String&, int, const String&, int, int, bool, const SharedPtr<System::Globalization::CultureInfo>&) method

يقارن أقل-يساوي-أكبر بين جزأين فرعيين.

static int System::String::Compare(const String &strA, int indexA, const String &strB, int indexB, int length, bool ignoreCase, const SharedPtr<System::Globalization::CultureInfo> &ci)
ParameterTypeالوصف
strAconst String&السلسلة الأولى للمقارنة.
indexAintبداية الجزء الفرعي الأول من السلسلة.
strBconst String&السلسلة الثانية للمقارنة.
indexBintبداية الجزء الفرعي الثاني من السلسلة.
الطولintعدد الأحرف للمقارنة.
ignoreCaseboolيحدد ما إذا كان المقارنة غير حساسة لحالة الأحرف.
ciconst SharedPtr<System::Globalization::CultureInfo>&الثقافة المستخدمة للمقارنة.

ReturnValue

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

انظر أيضًا

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

يقارن أقل-يساوي-أكبر بين جزأين فرعيين.

static int System::String::Compare(const String &strA, int indexA, const String &strB, int indexB, int length, bool ignoreCase=false)
ParameterTypeالوصف
strAconst String&السلسلة الأولى للمقارنة.
indexAintبداية الجزء الفرعي الأول من السلسلة.
strBconst String&السلسلة الثانية للمقارنة.
indexBintبداية الجزء الفرعي الثاني من السلسلة.
الطولintعدد الأحرف للمقارنة.
ignoreCaseboolيحدد ما إذا كان المقارنة غير حساسة لحالة الأحرف.

ReturnValue

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

انظر أيضًا

String::Compare(const String&, int, const String&, int, int, System::StringComparison) method

يقارن أقل-يساوي-أكبر بين سلسلتين.

static int System::String::Compare(const String &strA, int indexA, const String &strB, int indexB, int length, System::StringComparison comparison_type)
ParameterTypeالوصف
strAconst String&السلسلة الأولى للمقارنة.
indexAintبداية الجزء الفرعي الأول من السلسلة.
strBconst String&السلسلة الثانية للمقارنة.
indexBintبداية الجزء الفرعي الثاني من السلسلة.
الطولintعدد الأحرف للمقارنة.
comparison_typeSystem::StringComparisonComparison وضع.

ReturnValue

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

انظر أيضًا