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


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



Relevant Pages

  • Re: Advanced HTML DOM Issue
    ... I'm sorry, I wasn't explicit enough, I meant to say capitalize the ... the first letter of words and un-cap the rest, ... whole string causes the field to forget where the cursor is ... ...
    (alt.html)
  • Re: Surprise in StrConv using vbProperCase
    ... Your code will capitalize the first letter of a string. ... so the specs for StrConv using vbProperCase match ...
    (microsoft.public.access.modulesdaovba)
  • Re: Capitalize first letter in sentence
    ... PROPER will capitalize the first letter of each word, ... capitalizes just the first word of the string. ... This leaves the rest of the string unchanged and capitalises the first ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Need string for capitalization
    ... >> I'm trying to capitalize the first letter of a field but the string I am ... > In a report control Source: ...
    (microsoft.public.access.gettingstarted)
  • Re: Capitalize first letter of sentence
    ... Doesn't seem to do anything with ordinals either ... >> the first letter of the sentence is not capitalize. ... > From my typing class I learnt about the shift ...
    (microsoft.public.office.misc)