Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Clip] Replacing Uppercase with Propercase

Expand Messages
  • Larry Thomas
    Hello Prabodh, ... Yes. ^$StrCapitalize( Str )$ (added in v4.8) Capitalizes all words in Str and returns the resulting string When you run this clip you must
    Message 1 of 3 , Apr 30, 2003
      Hello Prabodh,

      At 05:55 AM 4/30/03 -0000, you wrote:
      >Hi,
      >Can anyone help me with the Clip Programming
      >I want to replace some of the words in a Document from Upper case
      >to Proper case i.e "CLIP" with "Clip"
      >
      >So can any one give me the codes for this

      Yes.

      ^$StrCapitalize("Str")$ (added in v4.8)
      Capitalizes all words in Str and returns the resulting string


      When you run this clip you must select some text before you run it to get
      it to work.

      ^!InsertText ^$StrCapitalize("^$GetSelection$")

      There you go. One line of code - very easy ;)

      Regards,

      Larry
      larryt@...
    • Prabodh S Shetty
      Thanks for sending a reply. Actually I want to format some text in a particular document which are in Upper case. I am sending U the example file i.e. how it
      Message 2 of 3 , May 7, 2003
        Thanks for sending a reply.

        Actually I want to format some text in a particular document which
        are in Upper case.
        I am sending U the example file i.e. how it looks before formating
        and another formated file how I want the text to be.

        U will understand exactly what I want to do. And also while
        formatting the document there are some rules i.e "of" word should
        not be "Of" same with "and" etc.

        If you still didn't get my aim then do ask me.

        I'm ready to explain it to you once again. But do send me some
        reply.

        Bi n waiting 4 ur reply.

        On Wed, 30 Apr 2003 Sheri wrote :
        >At 05:55 AM 4/30/03 +0000, you wrote:
        >>Hi,
        >>Can anyone help me with the Clip Programming
        >>I want to replace some of the words in a Document from Upper
        >>case
        >>to Proper case i.e "CLIP" with "Clip"
        >>
        >>So can any one give me the codes for this
        >>
        >>Thanks
        >Hi,
        >It doesn't make much sense to do this in a clip unless you are
        >also planning to automate the selection of text that will be
        >changed (e.g., with Find commands).
        >You can simply add "Capitalize" to your Toolbar or shortcut menu
        >using View|Options|Toolbar or View|Options|Shortcut Menu. The
        >Shortcut Menu is the list of commands that appears when you
        >right-click the mouse in a document.
        >Regards,
        >Sheri
        >Yahoo! Groups Sponsor
        >Your use of Yahoo! Groups is subject to the
        >Yahoo! Terms of Service
        >.
      • Sheri
        Hi Prabodh, ... I did not see your example. If you sent it as a file attachment, be aware that the list doesn t accept attachments. If your entire document is
        Message 3 of 3 , May 7, 2003
          Hi Prabodh,

          At 02:20 PM 5/7/03 +0000, you wrote:
          >I am sending U the example file i.e. how it looks before formating
          >and another formated file how I want the text to be.
          >
          >U will understand exactly what I want to do. And also while
          >formatting the document there are some rules i.e "of" word should
          >not be "Of" same with "and" etc.

          I did not see your example. If you sent it as a file attachment, be aware that the list doesn't accept attachments.

          If your entire document is composed of sentences where the words are all in upper case, you might try this clip:

          H="Propercase"
          ^!Select All
          ^$StrSentenceCase(^$GetSelection$)$

          The ^$StrSentenceCase function converts all the text to lower case, then capitalizes (i.e., changes to Title case) only the words that follow periods, exclamations and question marks. You could then use the spell checker to help find and capitalize any proper names. Or use a series of ^!Replace commands for known proper names.

          Sheri
        Your message has been successfully submitted and would be delivered to recipients shortly.