Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-05

Comparing strings case-insensitive and ignoring accents

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Weustink
to Marcos Douglas B. Santos
"Marcos Douglas B. Santos wrote 6 lines
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

Reply by email

Marcos Douglas B. Santos
to Marc Weustink
Marc Weustink wrote 12 lines
On May 20, 2018 4:06:42 AM GMT+02:00, "Marcos Douglas B. Santos via Lazarus" 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

Reply by email