Convert a numeric value to a string.

Synopsis

Declared in <bslstl_string.h>

string
to_string(long long value);
Note

This function is a hidden friend of basic_string, declared only inside that class: it can be found only through argument-dependent lookup.

Description

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what `std::sprintf(buf, "%lld", value)` would produce with a sufficiently large buffer.

Return Value

string representation of value

Parameters

Name

Description

value

numeric value to convert

Created with MrDocs