MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / FloatToStr

Function FloatToStr

PanzerChasm/settings.cpp:74–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74std::string FloatToStr( const float f )
75{
76 // HACK - replace ',' to '.' for bad locale
77 std::string result= std::to_string( f );
78 size_t pos = result.find(",");
79 if ( pos != std::string::npos ) result[pos] = '.';
80
81 return result;
82}
83
84static std::string MakeQuotedString( const std::string& str )
85{

Callers 2

SetSettingMethod · 0.85
GetOrSetFloatMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected