Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Lower Case a string

Posted on 2001-08-23
12
Medium Priority
?
540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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
 
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 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

618 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