fixstr::basic_fixed_string::empty
#1 |
|
Checks if the fixed string has no elements, i.e. whether begin() == end()
.
#
Parameters(none)
#
Return valuetrue
if the fixed string is empty, false
otherwise
#
ComplexityConstant.
#
Example#include <fixed_string.hpp>#include <iostream>
int main(){ fixstr::fixed_string hello_world = "Hello, world!"; fixstr::fixed_string<0> no_hello_world;
std::cout << std::boolalpha; std::cout << "hello_world.empty(): " << hello_world.empty() << '\n'; std::cout << "no_hello_world.empty(): " << no_hello_world.empty() << '\n';}
hello_world.empty(): falseno_hello_world.empty(): true