473,396 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Backwards search / Rückwärtssuche

Englisch:
Rear one, I have the following problem, I a program wrote, in which
one cannot look for it from above downward clicks one in the field
however from down upward, goes.

I must sketch now an algorithm, which scans a text upward, there my
program (power ++ of Sybase) such a function as standard equipment do
not provide.

The code for forward-searches:

German:

Hi,
Ich habe folgendes Problem, ich habe ein Programm geschrieben, in dem man
von oben nach unten suchen kann. klickt man im Feld jedoch von unten nach
oben, geht es nicht.

Ich muss nun einen Algorithmus entwerfen, der nach oben einen Text
durchsucht, da mein Programm (Power ++ von Sybase) eine solche Funktion von
Haus aus nicht mitliefert.

Der Code für die vorwärtssuche:

if (event->findNext)
{
suchtext = Suchen_Ersetzen_Dialog_1->GetFindText();
if (event->searchDown)
{
position = Richtextfeld_1->FindText( suchtext, FALSE, ganzwort,
beginAt );
if (position < 0)
{
position = Richtextfeld_1->FindText(suchtext);
}
text_laenge = suchtext.GetLength();
zeichen_index.start = position;
zeichen_index.end = position + text_laenge;
beginAt = zeichen_index.end;

Richtextfeld_1->SetFocus( );
Richtextfeld_1->SetEditSelection( zeichen_index );
}
else
{

//hier muss die Rückwartssuche rein!!!
}
}


return FALSE;
}

Englisch:

Into the elsespalte now the Rueckwaertssuche should purely. A
Richtextfeld is scanned. The program which I use is Power++ of Sybase.
The variable beginAt indicates the current cursor position in the
text.

Over each assistance I am grateful!

German:
In die elsespalte sollte nun die Rückwärtssuche rein. Es wird ein
Richtextfeld durchsucht.
Das Programm das ich nutze ist Power++ von Sybase.
Die Variable beginAt gibt die aktuelle Cursorposition im Text an.

Über jede Hilfe bin ich dankbar!
Jul 22 '05 #1
1 2221
ox
You might want to consider std::search and std::reverse_iterator.

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Shahid Juma | last post by:
Hi, I have a text file which I would like to read from the end and display only a certain number of records. Is there any way of doing this? Thanks, Shahid
15
by: SK | last post by:
Hey folks, I am searching for a string (say "ABC") backwards in a file. First I seek to the end. Then I try to make a check like - do { file.clear (); file.get(c); file.seekg(-2,...
11
by: Matt DeFoor | last post by:
I have some log files that I'm working with that look like this: 1000000000 3456 1234 1000000001 3456 1235 1000020002 3456 1223 1000203044 3456 986 etc. I'm trying to read the file...
6
by: Neil Patel | last post by:
I have a log file that puts the most recent record at the bottom of the file. Each line is delimited by a \r\n Does anyone know how to seek to the end of the file and start reading backwards?
2
by: janhm | last post by:
Hey, I had a problem with adding xml into a treeview few month ago. The project got abandon, but im now working with it again. Here is my problem: I have an xml file containing: <?xml...
150
by: tony | last post by:
If you have any PHP scripts which will not work in the current releases due to breaks in backwards compatibility then take a look at http://www.tonymarston.net/php-mysql/bc-is-everything.html and...
0
by: njuneardave | last post by:
This line of code will make the Find method search for a search key in a given range if you search from top to bottom: m_form.richTextBox1.Find(searchKey, searchDownAreaStart, searchDownAreaEnd,...
1
by: stoogots2 | last post by:
I have written a Windows App in C# that needs to read a text file over the network, starting from the end of the file and reading backwards toward the beginning (looking for the last occurrence of a...
4
by: Russell Mangel | last post by:
Hi, The code I have posted searches for a pattern of bytes starting from the end of Byte array *backwords*, if a match is found, return the starting index of those found bytes. Since one of...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.