From a584e84874abd077df5ee1f3687f84d9d4fc3bfa Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Thu, 6 Sep 2007 15:37:43 +0000 Subject: 20070906-1636 --- man/2/string | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'man/2/string') diff --git a/man/2/string b/man/2/string index 7d1c4298..9ce877ee 100644 --- a/man/2/string +++ b/man/2/string @@ -1,7 +1,7 @@ .TH STRING 2 .SH NAME string: append, drop, in, prefix, quoted, splitl, splitr, splitstrl, -splitstrr, take, tobig, toint, tolower, toupper, unquoted \- string operations +splitstrr, take, tobig, toint, toreal, tolower, toupper, unquoted \- string operations .SH SYNOPSIS .EX include "string.m"; @@ -18,6 +18,7 @@ splitstrr: fn(s, t: string): (string, string); take: fn(s, cl: string): string; tobig: fn(s: string, base: int): (big, string); toint: fn(s: string, base: int): (int, string); +toreal: fn(s: string, base: int): (real, string); tolower: fn(s: string): string; toupper: fn(s: string): string; quoted: fn(args: list of string): string; @@ -137,6 +138,21 @@ has the same specification as except that converts to 64-bit .BR big . .PP +.B Toreal +is similar to +.BR toint , +except that it expects a floating-point number after optional leading white space: +an optional sign, then a string of digits containing a decimal point, then an optional +.RB ` e ' +or +.RB ` E ' +followed by an optionally signed decimal integer exponent. +The string of digits can optionally be preceded by a base (radix) specifier +of the form +.IB B r , +as for integers. +Any exponent is then interpreted as a power of that base. +.PP .B Tolower converts all upper case letters in the string .I s -- cgit v1.2.3