Here a solution using only std. However, note that this only rounds down.
float number = 3.14159;
std::string num_text = std::to_string(number);
std::string rounded = num_text.substr(0, num_text.find(".")+3);
For rounded
it yields:
3.14
The code converts the whole float to string, but cuts all characters 2 chars after the "."