Fission FSN
Loading...
Searching...
No Matches
fsCShareText.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: fsCShareText.h
4*
5* Purpose: Builds share text: {field} substitution and the optional
6* "get the game" line. Engine-free so it can be tested.
7*
8*********************************************************************/
9
10#ifndef fsCShareTexthdr
11#define fsCShareTexthdr
12
13#include <map>
14#include <string>
15
16namespace fsCShareText
17{
18// Replaces each {name} with its field; unknown names are left as written.
19std::string substitute(const std::string& text, const std::map<std::string, std::string>& fields);
20
21// The message, then the link line on its own line when there is one. linkLine holds {url}.
22std::string compose(const std::string& message, const std::string& linkLine, const std::string& url);
23}
24
25#endif
Definition fsCShareText.h:17
std::string substitute(const std::string &text, const std::map< std::string, std::string > &fields)
Definition fsCShareText.cpp:3
std::string compose(const std::string &message, const std::string &linkLine, const std::string &url)
Definition fsCShareText.cpp:37