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

String::IndexOf(char_t, int, int) const method

بحث أمامي للحرف في الجزء الفرعي.

int System::String::IndexOf(char_t c, int startIndex, int count) const
ParameterTypeالوصف
cchar_tحرف للبحث عنه.
startIndexintفهرس بدء البحث عند.
countintعدد الأحرف للبحث عبرها.

ReturnValue

مؤشر أول موضع حرف منذ startIndex أو -1 إذا لم يُعثر عليه.

انظر أيضًا

String::IndexOf(char_t, int) const method

بحث أمامي للحرف.

int System::String::IndexOf(char_t c, int startIndex=0) const
ParameterTypeالوصف
cchar_tحرف للبحث عنه.
startIndexintفهرس بدء البحث عند.

ReturnValue

مؤشر أول موضع حرف منذ startIndex أو -1 إذا لم يُعثر عليه.

انظر أيضًا

String::IndexOf(const String&, int, int) const method

بحث أمامي في الجزء الفرعي.

int System::String::IndexOf(const String &str, int startIndex, int count) const
ParameterTypeالوصف
strconst String&السلسلة الفرعية للبحث عنها.
startIndexintالموضع في السلسلة المصدر لبدء البحث عبره.
countintعدد الأحرف التي يجب البحث خلالها.

ReturnValue

فهرس أول سلسلة فرعية تم العثور عليها أو -1 إذا لم يتم العثور عليها. بالنسبة لسلسلة البحث الفارغة، دائمًا يُرجع startIndex.

انظر أيضًا

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

بحث أمامي في الجزء الفرعي.

int System::String::IndexOf(const String &str, int startIndex, System::StringComparison comparison_type) const
ParameterTypeالوصف
strconst String&السلسلة الفرعية للبحث عنها.
startIndexintالموضع في السلسلة المصدر لبدء البحث عبره.
comparison_typeSystem::StringComparisonComparison وضع.

ReturnValue

فهرس أول سلسلة فرعية تم العثور عليها أو -1 إذا لم يتم العثور عليها. بالنسبة لسلسلة البحث الفارغة، دائمًا يُرجع startIndex.

انظر أيضًا

String::IndexOf(const String&, int) const method

بحث أمامي في الجزء الفرعي.

int System::String::IndexOf(const String &str, int startIndex=0) const
ParameterTypeالوصف
strconst String&السلسلة الفرعية للبحث عنها.
startIndexintالموضع في السلسلة المصدر لبدء البحث عبره.

ReturnValue

فهرس أول سلسلة فرعية تم العثور عليها أو -1 إذا لم يتم العثور عليها. بالنسبة لسلسلة البحث الفارغة، دائمًا يُرجع startIndex.

انظر أيضًا

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

بحث أمامي في الجزء الفرعي.

int System::String::IndexOf(const String &str, System::StringComparison comparison_type) const
ParameterTypeالوصف
strconst String&السلسلة الفرعية للبحث عنها.
comparison_typeSystem::StringComparisonComparison وضع.

ReturnValue

فهرس أول سلسلة فرعية تم العثور عليها أو -1 إذا لم يتم العثور عليها. بالنسبة لسلسلة البحث الفارغة، دائمًا يُرجع 0.

انظر أيضًا

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

بحث أمامي في الجزء الفرعي.

int System::String::IndexOf(const String &value, int startIndex, int count, System::StringComparison comparisonType) const
ParameterTypeالوصف
valueconst String&السلسلة الفرعية للبحث عنها.
startIndexintالموضع في السلسلة المصدر لبدء البحث عبره.
countintعدد الأحرف التي يجب البحث خلالها.
comparisonTypeSystem::StringComparisonComparison وضع.

ReturnValue

فهرس أول سلسلة فرعية تم العثور عليها أو -1 إذا لم يتم العثور عليها. بالنسبة لسلسلة البحث الفارغة، دائمًا يُرجع startIndex.

انظر أيضًا