Ember
A C++ 20 'game engine' built with SDL3 with wide platform support.
Functions
ember_utils.cpp File Reference
#include "core/ember_utils.h"

Functions

std::string text_format (const char *fmt,...)
 Create a formatted string. More...
 
int get_memory_usage ()
 Get the current memory usage in MB. More...
 
int get_available_memory ()
 Get the available system memory in MB. More...
 
int get_cpu_cores_num ()
 Get the number of CPU cores ( LOGICAL ) More...
 
const char * file_extension_to_mime_type (const char *ext)
 Get MIME type from file extension. More...
 

Function Documentation

◆ file_extension_to_mime_type()

const char* file_extension_to_mime_type ( const char *  ext)

Get MIME type from file extension.

Parameters
extFile extension
Returns
MIME type string or "application/octet-stream"
Version
1.2.0

◆ get_available_memory()

int get_available_memory ( )

Get the available system memory in MB.

Returns
Available memory in MB
Version
0.0.8

◆ get_cpu_cores_num()

int get_cpu_cores_num ( )

Get the number of CPU cores ( LOGICAL )

Returns
Number of CPU cores
Version
1.2.0

◆ get_memory_usage()

int get_memory_usage ( )

Get the current memory usage in MB.

Note
Not implemented yet
Version
1.2.0
Returns
Memory usage in MB

◆ text_format()

std::string text_format ( const char *  fmt,
  ... 
)

Create a formatted string.

Returns
Formatted String
Version
0.0.8