Solved

Lower Case a string

Posted on 2001-08-23
12
531 Views
Last Modified: 2010-04-06
How do I use delphi's editor to search for a string and lower-case it.
(query-replace)
0
Comment
Question by:hulken
  • 6
  • 4
  • 2
12 Comments
 
LVL 8

Expert Comment

by:TOndrej
ID: 6416571
I suppose you are talking about multiple occurencies of the search string.
A keyboard macro could make it easier. In the following example, I suppose you are using the Default key mapping.

1. Do your first search manually. Delphi will highlight the found occurence and the caret will be positioned next to it.
2. Start recording a macro by pressing Ctrl+Shift+R.
3. Select the found occurrence with Shift+arrows or if it's a whole token you can use Ctrl+K, Ctrl+T.
4. Lowercase the selection with Ctrl+K, Ctrl+E.
5. Search for the next occurrence with F3.
6. Stop recording by pressing Ctrl+Shift+R again.
7. Play your macro with Ctrl+Shift+P. Repeat until no more occurrencies are found.

HTH
TOndrej
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 6416737
You can do it even easier: use the Search -> Replace (CTRL+R), and enter the string you want to lowercase in both fields as lowercase. Make sure that none of the Options are checked, and hit "Replace All".
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 6416748
AvonWyss is right :-)

I assumed this was a regular expression search; if the search string is 'static' then the replace string is, too.

:-)
0
 

Author Comment

by:hulken
ID: 6416829
If I wan't to lowercase all that I have marked in a unit ?

it seems like ctrl+k ctrl+e don't allow me to select all in a text-file and lowercase it.
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 6416883
You're right, Ctrl+K, Ctrl+E only lowercases words. If the selection is bigger, only the last word is lowercased. I didn't know this...
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 6416885
You could write a keybinging to do what you want.
There's a demo in Demos\ToolsAPI\Editor Keybinding
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 14

Expert Comment

by:AvonWyss
ID: 6416945
To lowercase a selection, use CTRL-K + O
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 6416957
Cool AvonWyss, did you find that in the help file?
I can't find it...
0
 
LVL 14

Accepted Solution

by:
AvonWyss earned 50 total points
ID: 6417064
No, that's just basic knowledge... ;-)

http://community.borland.com/article/0,1410,19549,00.html
0
 

Author Comment

by:hulken
ID: 6417066
thnks for the help
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 6417067
Thanks for the link :-)
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 6417074
You're all welcome!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now