私は主にC++ライブラリから標準関数を探しています。これは、文字列内で文字を検索し、見つかった文字から始まる文字列の残りの部分を出力するのに役立ちます。次のシナリオがあります。
#include <string>
using std::string;
int main()
{
string myFilePath = "SampleFolder/SampleFile";
// 1. Search inside the string for the '/' character.
// 2. Then print everything after that character till the end of the string.
// The Objective is: Print the file name. (i.e. SampleFile).
return 0;
}
よろしくお願いします。コードの完成を手伝っていただければ幸いです。