MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / AppendStringInPlace

Function AppendStringInPlace

src/strings.cpp:434–438  ·  view source on GitHub ↗

* Resolve the given StringID and append in place into an existing std::string with formatting but no parameters. * @param result The std::string to place the translated string. * @param string The unique identifier of the translatable string. */

Source from the content-addressed store, hash-verified

432 * @param string The unique identifier of the translatable string.
433 */
434void AppendStringInPlace(std::string &result, StringID string)
435{
436 StringBuilder builder(result);
437 GetStringWithArgs(builder, string, {});
438}
439
440void AppendStringWithArgsInPlace(std::string &result, StringID string, std::span<StringParameter> params)
441{

Callers 5

MakeCargoListStringMethod · 0.85
GetTrainEngineInfoStringFunction · 0.85
DrawBadgeNameListFunction · 0.85
DrawRoadVehDetailsFunction · 0.85

Calls 1

GetStringWithArgsFunction · 0.85

Tested by

no test coverage detected