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

A string expression that generates a string replacing all occurrences of the given substring. More...

#include <sstring.h>

Public Member Functions

constexpr expr_replaced (simple_str< K > w, simple_str< K > p, simple_str< K > r)
 Constructor.
 

Detailed Description

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

A string expression that generates a string replacing all occurrences of the given substring.

Template Parameters
K- string type.

e_repl only allows replacement using string literals. In the case when the required substring or replacement string is not known at compilation, and is set at runtime, this type should be used, for example:

stringa result = "<header>" + expr_replaced<u8s>{source, pattern, repl} + "</header>";
constexpr expr_replaced(simple_str< K > w, simple_str< K > p, simple_str< K > r)
Constructor.
Definition sstring.h:5995

Constructor & Destructor Documentation

◆ expr_replaced()

template<typename K>
simstr::expr_replaced< K >::expr_replaced ( simple_str< K > w,
simple_str< K > p,
simple_str< K > r )
inlineconstexpr

Constructor.

Parameters
w- source string.
p- the searched substring.
r- replacement string.

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