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

[Clip] Re: Upper & Low cases

Expand Messages
  • Sheri
    Just another possibility: This one loops from the top finding only lower case letters as the first character of a line (possibly preceeded by a double quote)
    Message 1 of 15 , Aug 12, 2009
      Just another possibility: This one loops from the top finding only lower case letters as the first character of a line (possibly preceeded by a double quote) and capitalizes them. Works for plain and accented latin characters.

      ^!Jump Doc_start
      :loop
      ^!Find "^\x22?\K\p{Ll}" RS
      ^!Iferror Out
      ^!Menu Modify/Text Case/Upper Case
      ^!Goto loop
      :Out

      Regards,
      Sheri
    • ebbtidalflats
      I d like to offer my 2 cents worth (or as Axel would say, his mustard): To change the case of EVERY first character of every line, WITHOUT LOOPING, use the
      Message 2 of 15 , Aug 15, 2009
        I'd like to offer my 2 cents worth (or as Axel would say, his mustard):

        To change the case of EVERY first character of every line,
        WITHOUT LOOPING, use the BLOCK mode and a helper file,
        something like (untested):

        ^!SetWordWrap OFF
        ^!SelectTo ^$GetLineCount$:2
        ^!Menu Modify/Block/Cut
        ^!Set %orig%=^$GetDocIndex$
        ^!Menu File/New
        ^!Set %helper%=^$GetDocIndex$
        ^!Menu Edit/Paste
        ^!Menu Modify/"Text case"/"Upper case"
        ^!Select All
        ^!Menu Modify Block/Copy
        ^!SetDocIndex ^%orig%
        ^!SetCursor 1:1
        ^!Menu Block/Paste
        ^!DestroyDoc ^$GetDocName(^%helper%)$

        Anybody care to time executions of the various solutions?

        Cheers,

        Eb


        --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
        >
        > John Shotsky wrote:
        > > and usually, upper case letters should not be accented anyway.
        >
        > Sorry, but in this case I claim superior knowledge as a German: Ärger,
        > Ångstrøm, Über (capitalized as the first word of a sentence), Ölsand
      Your message has been successfully submitted and would be delivered to recipients shortly.