ssprintf
Abstract
ssprintf()
is the std::string
version of sprintf()
.
ssprintf()
は,sprintf()
の std::string
版です.
Header file
namespace sstd{
std::string ssprintf(const char* format, ...);
}
Usage
- main.cpp
#include <sstd/sstd.hpp> int main(){ std::string s = sstd::ssprintf("%s %d%d%d %03d", "ABC", 0, 1, 2, 3); sstd::printn(s); }
- Execution result
s = "ABC 012 003"
Implementation
- Source: sstd/src/string/ssprintf.cpp
- Header: sstd/src/string/ssprintf.hpp
- Test: test/src_test/string/strEdit.cpp (Not implemented yet)