Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FormatUtil.cpp File Reference
#include "MemDebug.h"
#include "FormatUtil.h"

Go to the source code of this file.

Functions

void FormatNumber (char *txt, double n)
void FormatNumberExp (char *txt, double n)
void FormatTime (char *txt, double time)
void FormatTimeOfDay (char *txt, double time)
void FormatDayTime (char *txt, double time, bool short_format)
void FormatDay (char *txt, double time)
void FormatPoint (char *txt, const Point &p)
Text FormatTimeString (int utc)
const char * SafeString (const char *s)
const char * SafeQuotes (const char *msg)
Text FormatTextReplace (const char *msg, const char *tgt, const char *val)
Text FormatTextEscape (const char *msg)

Variables

const int MINUTE = 60
const int HOUR = 60 * MINUTE
const int DAY = 24 * HOUR

Function Documentation

void FormatDay ( char *  txt,
double  time 
)

Definition at line 126 of file FormatUtil.cpp.

void FormatDayTime ( char *  txt,
double  time,
bool  short_format 
)

Definition at line 95 of file FormatUtil.cpp.

void FormatNumber ( char *  txt,
double  n 
)

Definition at line 19 of file FormatUtil.cpp.

void FormatNumberExp ( char *  txt,
double  n 
)

Definition at line 44 of file FormatUtil.cpp.

void FormatPoint ( char *  txt,
const Point p 
)

Definition at line 142 of file FormatUtil.cpp.

Text FormatTextEscape ( const char *  msg)

Definition at line 296 of file FormatUtil.cpp.

Text FormatTextReplace ( const char *  msg,
const char *  tgt,
const char *  val 
)

Definition at line 256 of file FormatUtil.cpp.

void FormatTime ( char *  txt,
double  time 
)

Definition at line 61 of file FormatUtil.cpp.

void FormatTimeOfDay ( char *  txt,
double  time 
)

Definition at line 77 of file FormatUtil.cpp.

Text FormatTimeString ( int  utc)

Definition at line 157 of file FormatUtil.cpp.

const char* SafeQuotes ( const char *  msg)

Definition at line 230 of file FormatUtil.cpp.

const char* SafeString ( const char *  s)

Definition at line 182 of file FormatUtil.cpp.


Variable Documentation

const int DAY = 24 * HOUR

Definition at line 59 of file FormatUtil.cpp.

const int HOUR = 60 * MINUTE

Definition at line 58 of file FormatUtil.cpp.

const int MINUTE = 60

Definition at line 57 of file FormatUtil.cpp.