Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.