[Lazarus] Comparing strings case-insensitive and ignoring accents

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Comparing strings case-insensitive and ignoring accents

Free Pascal - Lazarus mailing list
Hi,

Is there any (fast) built-in function in RTL or LCL that compare two strings using case-insensitive and ignoring accents?

These strings are UTF-8.

Best regards,
Marcos Douglas

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Comparing strings case-insensitive and ignoring accents

Free Pascal - Lazarus mailing list


On May 20, 2018 4:06:42 AM GMT+02:00, "Marcos Douglas B. Santos via Lazarus" <[hidden email]> wrote:
>Hi,
>
>Is there any (fast) built-in function in RTL or LCL that compare two
>strings using case-insensitive and ignoring accents?
>
>These strings are UTF-8.

For comparing case insensitive strings you can use SameText(). Don't know if there is a function to strip accents.

Marc
>

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Comparing strings case-insensitive and ignoring accents

Free Pascal - Lazarus mailing list
On Sun, May 20, 2018 at 2:39 PM, Marc Weustink via Lazarus
<[hidden email]> wrote:

>
>
>
> On May 20, 2018 4:06:42 AM GMT+02:00, "Marcos Douglas B. Santos via Lazarus" <[hidden email]> wrote:
> >Hi,
> >
> >Is there any (fast) built-in function in RTL or LCL that compare two
> >strings using case-insensitive and ignoring accents?
> >
> >These strings are UTF-8.
>
> For comparing case insensitive strings you can use SameText(). Don't know if there is a function to strip accents.

Hey Marc.
I know about SameText that calls CompareText, but I need to combine
with other one that strip accents.
I can make it, but I prefer use built-in functions for do not have
issues about encode, etc.

Thanks, anyway.

Regards,
Marcos Douglas
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus