File format.icn |
$Id: format.icn,v 1.2 2006-07-10 13:43:32 rparlett Exp $ This file is in the public domain. Author: Robert Parlett (parlett@dial.pipex.com)
This file is part of the util package.
Source code.Details |
Procedures: |
Add escape sequences to the subject.
format_int_to_string(subject, base, p)
Convert an integer to a string. @param base The desired base of the result. @param p The minimum width of the result, padding with zeroes @ if necessary.
Convert the subject integer into words, eg 231 to "Two Hundred and Thirty-One"
format_numeric_to_string(subject, p, f)
Convert a numeric to a string. @param p The number of decimal places to produce (default 4). @param f A cset of flags. If c contains {'e'} then the output is @ in scientific notation. If c contains {','} then commas @ are introduced into the non-fractional part of the number; @ if c contains {'+'} then a leading + is added to positive @ numbers. @
format_string_to_int(subject, base)
Convert a string to an integer. @param base The base to use for the conversion (default is 16).
Remove escape sequences from the subject.