std::ranges::starts_with
Актуально для C++26.
#include <algorithm>
Актуально на 2025-06-03.
#include <iostream>
#include <algorithm>
#include <string>
namespace ranges = std::ranges;
int main()
{
std::string str1 = "abcdefghijk";
std::string str2 = "abс";
std::cout << std::boolalpha
<< ranges::starts_with(str1, str2) << std::endl;
}
See also
TODO
This page was last modified on 2025-06-03