I want to index the inside elements.
Run Code Online (Sandbox Code Playgroud)
考虑以下程序:
#include <iostream>
int main()
{
std::string str = "Example";
if (str.length() > 2)
{
std::cout << str.substr(1, str.length() - 2);
}
else
{
std::cout << str;
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
它的输出是xampl.
| 归档时间: |
|
| 查看次数: |
5098 次 |
| 最近记录: |