libzed 1.9.9
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);
}
}
A template class for character strings.
Definition string.hpp:62
static string words(long long value, bool ordinal=false) noexcept
Generate an English representation of a given number.