simstr 1.2.4
Yet another strings library
 
Loading...
Searching...
No Matches
simstr::empty_expr< K > Struct Template Reference

An "empty" string expression. More...

#include <strexpr.h>

Detailed Description

template<typename K>
struct simstr::empty_expr< K >

An "empty" string expression.

Template Parameters
Kis a symbol.

A simple string expression that generates an empty string. Mainly used in the e_choice function when one of the branches should return an empty string. Either to start the addition operation of string expressions when the other operand is not a string expression, but there is an addition operator for it with string expressions. For convenience, constant objects of this type have already been defined for different types of symbols:

  • eea for empty char string
  • eew for empty string wchar_t
  • eeu for empty string char16_t
  • eeuu for empty string char32_t

Example:

result = shost + e_choice(sserv.is_empty(), eea, ":" + sserv);
constexpr auto e_choice(bool c, const A &a, const B &b)
Create a conditional string expression expr_choice.
Definition strexpr.h:1037
constexpr empty_expr< u8s > eea
Empty string expression of type char.
Definition strexpr.h:522
result += "E" + e_choice(adjusted_exponent > 0, "+"_ss, eea) + adjusted_exponent;

The documentation for this struct was generated from the following file: