Re: Small feature request for future EU versions
- Posted by "Igor Kachan" <kinz at peterlink.ru> Oct 26, 2004
- 665 views
Ricardo Forno wrote: [snip] > Hi, Igor. > Your function is slow compared to other approaches. > Since in Euphoria (and also i C and other languages) a character is just a > number, may I suggest a change? > I think it would be much faster having two 256-character sequences, one > representing the "translation" of the other (characters in the same > position), and using the input characters as indexes. > This way, you will get not only a way to translate between upper and lower > case, but also (changing the sequences) to translate ASCII to EBCDIC or > vice-versa, or any translation character by character you want. > Regards. Hi, Ricardo! Yes, my case_LA() function is twice as slower than standard upper() and lower(). I tested them both just now. I like to speed up things, but I have no this problem with conversion or translation. I translate all bilingual EU libs into Latinic Russian in a small fraction of second and never wait a results. Esc t or Esc e in red.ex and that final beep sounds. I like your suggestion, but I just do not see the solution how to make this way the stable templet for *any* alphabet now. But case_LA() function is templet for any possible alphabet and any code page just now, as far as I can see. Some alphabets have no case at all, some alphabets have different numbers of upper and lower letters. For example, computer Russian has 3 extra letters in upper case, which are absent in Russian canonical grammar. But speed is good thing, yes, Ricardo. Try, maybe you can make such a fast & simple templet. For now, I can not imagine another possible function. Regards, Igor Kachan kinz at peterlink.ru