Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Good day Find similar branches


Dmitry1   (2001-12-14 16:53) [0]

How to determine if there are Cyrillic characters in the drain?
You can convert the question a little:
how to determine what is in the line only: latin letters and service signs



Mick   (2001-12-14 16:56) [1]

Did you try to compare the characters of this line with the characters of the Cyrillic alphabet?



Dmitry1   (2001-12-14 17:01) [2]

this can certainly be done, but I'm afraid it will work for a long time. I have more than 2000 lines that need to be processed. : ((



Mick   (2001-12-14 17:05) [3]

8086 processor? So he is quite capable of it.



Dmitry1   (2001-12-14 17:11) [4]

But what special function is not there?



Mick   (2001-12-14 17:15) [5]

There is such a function!
Her last name If



Dmitry1   (2001-12-14 19:42) [6]

I asked about the API functions. : ((And in your solution to the problem, it’s better not to if apply and homes since the type char is enumerable.
I need the Api function in order to work with encodings correctly.



Tonie   (2001-12-14 19:46) [7]

the line has no sign of encoding, so really you just need to go along the line and check the character code for belonging to the Latin alphabet like: "A" .. "Z", "a" .. "z": Result: = inLatin



Mick   (2001-12-14 19:48) [8]

And than for example this:
if MyString [i] in ["A" .. "i"] then ...
worse than case?

And where exactly was the question about API functions, I didn’t notice something right away?



Вадим   (2001-12-14 19:53) [9]

case? They arrived, rowed all night, and forgot to untie the boat ...

function IsRus (s: string): boolean;
was
i: integer;
const
RusChars = ["A" .. "I", "a" .. "I"];
begin
Result: = False;
for i: = 1 to Length (s) do
if s [i] in RusChars then
begin
Result: = True;
Break;
end;



Mick   (2001-12-14 19:55) [10]

Better this way :)
for i: = 1 to Length (s) do begin Result: = s [i] in RusChars; if Result then Break; end;



Mbo   (2001-12-15 07:53) [11]

> how to determine what is in the line only: latin letters and service signs
onlylat: = true;
for i: = 1 to length (s) do if ord (s [i])> 127 then begin
onlylat: = false;
break;
end;



Anatoly Podgoretsky   (2001-12-15 12:07) [12]

Better all the same not (s [i] in LatinAndSpecialChars) otherwise, some signs are cut off, for example, monetary symbols and some other
It will be more flexible



Dmitry1   (2001-12-17 15:08) [13]

Thanks to everyone who called.



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top





Memory: 0.58 MB
Time: 0.036 c
1-22057
AlexeyV
2001-12-19 03:34
2002.01.08
How to cause a dialogue


1-22081
Andrewv
2001-12-18 14:14
2002.01.08
How to cause a system error.


6-22268
Voha
2001-10-05 13:25
2002.01.08
There is no referer parameter in the WebBrowser component.


6-22276
Lamok
2001-10-05 23:13
2002.01.08
Sending data to the Internet


4-22481
Stropal
2001-11-03 10:44
2002.01.08
Work printers directly. Advise





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish