![]() |
ToyGine2 26.2.0
Game Engine for retro consoles
|
Concept satisfied when T exposes size() as size_t and c_str() as a pointer to null-terminated characters.
More...
Concept satisfied when T exposes size() as size_t and c_str() as a pointer to null-terminated characters.
This concept defines the interface that any type must satisfy to be considered string-like. It requires the type to have a size() method that returns a value convertible to size_t, and a c_str() method that returns a value convertible to const char*.
A type T satisfies StringLike if and only if:
T::size() returns size_t (std::same_as<size_t>).T::c_str() returns std::convertible_to<const char *>.std::string, toy::CStringView, and toy::FixedString are typical representatives; other types qualify if they match the expression requirements above.