Re: [string totitle "ab cd ef"] does not output "Ab Cd Ef" but instead"Ab cd ef" -- Why?
From: Bruce Hartweg (bruce-news_at_hartweg.us)
Date: 08/27/04
- Next message: Derek: "Re: Large binary data manipulation"
- Previous message: Will Duquette: "Re: [string totitle "ab cd ef"] does not output "Ab Cd Ef" but instead"Ab cd ef" -- Why?"
- In reply to: Will Duquette: "Re: [string totitle "ab cd ef"] does not output "Ab Cd Ef" but instead"Ab cd ef" -- Why?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 Aug 2004 14:04:06 -0500
Will Duquette wrote:
> Arjen Markus <arjen.markus@wldelft.nl> writes:
>
>
>>Gerry Snyder wrote:
>>
> > > This is not a major issue, but I am curious. I may have missed some
>
>>>simple way of doing what I want. The command [string totitle
>>>"whatever"] does not work as I would expect. What it outputs is more
>>>appropriate for a sentence than for a title.
>>
>>Hm, if this is what you expect from a title, why did you not use that
>>convention in the title of your posting? ;)
>>
>>I checked a few books in my cupboard and on my desk:
>>- Some capitalise all the words
>>- Some capitalise almost all words, except of, and and such
>>- Some capitalise all letters
>>- Some capitalise the first letter of the first word only.
>
>
> Nevertheless, Gerry's point is well-taken. When it comes to
> capitalizing a string, sometimes you want to capitalize just the first
> letter, and sometimes you want to capitalize the first letter of every
> word. It would be nice if [string totitle] supported both.
>
but this comes down to how do you define a word? (See other thread
for a little more on this). imho, as soon as a string becomes a
sentence and you need to parse/interpret it, haveeing a simple
string function falls a bit short. for it to work properly the
interface would need a way for you to define what a word is to
you.
bruce
- Next message: Derek: "Re: Large binary data manipulation"
- Previous message: Will Duquette: "Re: [string totitle "ab cd ef"] does not output "Ab Cd Ef" but instead"Ab cd ef" -- Why?"
- In reply to: Will Duquette: "Re: [string totitle "ab cd ef"] does not output "Ab Cd Ef" but instead"Ab cd ef" -- Why?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|