Open
Description
Needs a check that will find a long concatenation chain and will suggest to use std::format
instead.
BEFORE:
std::string message = "Hi " + name + "! You are " + std::to_string(age) +
" years old and your height is " +
std::to_string(static_cast<int>(std::floor(height))) +
"." + std::to_string(static_cast<int>(100 * (height - std::floor(height)))) + " m.";
AFTER:
std::string message = std::format(
"Hi {}! You are {} years old and your height is {}.{} m.",
name, age, static_cast<int>(std::floor(height)),
static_cast<int>(100 * (height - std::floor(height)))
);