System::String::LastIndexOf メソッド

String::LastIndexOf(char_t) const method

文字の後方検索。

int System::String::LastIndexOf(char_t value) const
パラメーター説明
valuechar_t検索する文字です。

ReturnValue

最後の文字位置のインデックス、または見つからない場合は -1。

参照

String::LastIndexOf(char_t, int32_t) const method

文字の後方検索。

int System::String::LastIndexOf(char_t value, int32_t startIndex) const
パラメーター説明
valuechar_t検索する文字です。
startIndexint32_t検索を開始するインデックス。

ReturnValue

startIndex 以降の最後の文字位置のインデックス、または見つからない場合は -1。

参照

String::LastIndexOf(char_t, int32_t, int32_t) const method

文字の後方検索。

int System::String::LastIndexOf(char_t value, int32_t startIndex, int32_t count) const
パラメーター説明
valuechar_t検索する文字です。
startIndexint32_t検索を開始するインデックス。
countint32_t検索対象の文字数

ReturnValue

startIndex 以降の最後の文字位置のインデックス、または見つからない場合は -1。

参照

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

部分文字列の後方検索。

int System::String::LastIndexOf(const String &str, int startIndex, System::StringComparison comparison_type) const
パラメーター説明
strconst String&検索するサブ文字列。
startIndexint検索を開始する元文字列内の位置。
comparison_typeSystem::StringComparisonComparison モード。

ReturnValue

最後に見つかったサブ文字列のインデックス、または見つからない場合は -1。検索文字列が空の場合、常に文字列の長さを返します。

参照

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

部分文字列の後方検索。

int System::String::LastIndexOf(const String &str, int startIndex=INT32_MAX) const
パラメーター説明
strconst String&検索するサブ文字列。
startIndexint検索を開始する元文字列内の位置。

ReturnValue

最後に見つかったサブ文字列のインデックス、または見つからない場合は -1。検索文字列が空の場合、常に文字列の長さを返します。

参照

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

部分文字列の後方検索。

int System::String::LastIndexOf(const String &str, System::StringComparison comparison_type) const
パラメーター説明
strconst String&検索するサブ文字列。
comparison_typeSystem::StringComparisonComparison モード。

ReturnValue

最後に見つかったサブ文字列のインデックス、または見つからない場合は -1。検索文字列が空の場合、常に文字列の長さを返します。

参照

String::LastIndexOf(const String&, int, int, StringComparison) const method

部分文字列の後方検索。

int System::String::LastIndexOf(const String &value, int startIndex, int count, StringComparison comparisonType) const
パラメーター説明
valueconst String&検索するサブ文字列。
startIndexint検索を開始する元文字列内の位置。
countint検索対象の文字数。
comparisonTypeStringComparisonComparison モード。

ReturnValue

最後に見つかったサブ文字列のインデックス、または見つからない場合は -1。検索文字列が空の場合、常に startIndex+count を返します。

参照