libzed 1.12.3
A general-purpose library for quick and simple data manipulation.
Loading...
Searching...
No Matches
numberwang.cpp
// A simple example of the zstring::words() static method.
// For each integer given as a parameter, this example will print the english representation of that number.
#include <iostream>
#include <z/core/string.hpp>
int main(int argc, char **argv) {
for (int i = 1; i < argc; ++i) {
auto value = (long)zstring(argv[i]);
zstring::words(value).writeln(std::cout);
}
}
static string words(long long value, bool ordinal=false) noexcept
Generate an English representation of a given number.
void writeln(std::ostream &stream) const noexcept
Write string data to a stream in its format, appending a newline.
Definition string.hpp:1538