Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
colorize.h
Go to the documentation of this file.
1/*
2Part of Minetest
3Copyright (C) 2024 rubenwardy
4
5Permission to use, copy, modify, and distribute this software for any
6purpose with or without fee is hereby granted, provided that the above
7copyright notice and this permission notice appear in all copies.
8
9THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*/
17
18#pragma once
19
20#include <string>
21#include "config.h"
22
23#define COLOR_CODE(color) "\x1b(c@" color ")"
24
25#if USE_CURL
26
32std::string colorize_url(const std::string &url);
33
34#endif
std::string colorize_url(const std::string &url)
Colorize URL to highlight the hostname and any unsafe characters.
Definition: colorize.cpp:27