MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Two Text-String Questions




On Wed, 27 Sep 1995, James Renken wrote:

> 1. How can I convert a number into words?  (For example, 94,000 into 
> "ninety-four thousand")

I'm not a lambda-core user, but I seem to remember seeing this somewhere 
in one of the programmer utils core objects.  Check $string_utils, etc.  
I think there is a function that already does this.  If you don't find 
it, wait a bit, as someone will undoubtably reply to this message with 
the exact function :^)

> 2. How can I remove certain text from a string?  (For example, "SOMETHING.html" 
> into "SOMETHING")

Use the strsub function.

strsub("SOMETHING.html", ".html", "")    ->   "SOMETHING"

Regards,

+-------------------------------------------------------------------------+
| Ian Macintosh         | P.O. Box 24-036      | Anything really worth    |
| General Manager       | Royal Oak            | doing, is worth doing    |
| Sytek New Zealand Ltd | Auckland 1           | badly.     - Duncan Shaw |
+-------------------------------------------------------------------------+


Follow-Ups: References:

Home | Subject Index | Thread Index