The-Powder-Toy/src/Format.h
xphere07 fe67ec8550
Add temperature scales option
Make the PROP tool default to the current temperature scale
Make the PROP tool's temp suffixes work in the console(This is currently blocked by AnyType doing resource management wrong)

Signed-off-by: xphere07 <xphere07@outlook.com>
2022-12-27 22:07:52 +09:00

20 lines
636 B
C++

#pragma once
#include "Config.h"
#include "common/String.h"
#include <vector>
class VideoBuffer;
namespace format
{
ByteString URLEncode(ByteString value);
ByteString URLDecode(ByteString value);
ByteString UnixtimeToDate(time_t unixtime, ByteString dateFomat = ByteString("%d %b %Y"));
ByteString UnixtimeToDateMini(time_t unixtime);
String CleanString(String dirtyString, bool ascii, bool color, bool newlines, bool numeric = false);
std::vector<char> VideoBufferToPPM(const VideoBuffer & vidBuf);
void RenderTemperature(StringBuilder &sb, float temp, int scale);
float StringToTemperature(String str, int defaultScale);
}