Hi Mihály, On Thursday, 2015-01-29 14:57:58 +0100, Mihály Palenik wrote:
I'd like to examine a string is part of another but in all languages. I know CollatorWrapper class which has compareString method to compare two strings using uno. I'm searching this kind of method.
For case significant comparisons and literal string in string search you can use OUString::indexOf() As soon as the search shall be done case insignificant you'll have to transliterate and for that you need to specify the language. If the searched string should be the start of a string you could use TransliterationWrapper::equals() from include/unotools/transliterationwrapper.hxx If the search string can appear anywhere the practical approach is to transliterate both strings to, for example, lowercase and then use OUString::indexOf() to search the occurrence. Eike -- LibreOffice Calc developer. Number formatter stricken i18n transpositionizer. GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/ Care about Free Software, support the FSFE https://fsfe.org/support/?erack
Attachment:
pgpkD_vNl9G1i.pgp
Description: PGP signature