Strcomp with collation

I’m looking for a string comparison function with collation, is there any function or plugin available ?

Mainly for Windows as I have solved Mac with OS calls.

Thanks.

what collation?

Depends on user; I would set the locale before, something like strcoll in C++

Can’t you add your text into an array and use the sort method ( http://documentation.xojo.com/index.php/Sort)

John, no, I can’t. Sometimes the strings to sort are filenames, others part of dictionary arrays.

And not sure if sort, like Strcomp, cares for different cultures.

Hmm…

Maybe a work around by using SQLite (XOJO SQLiteDatabase) for that. Might also be faster…https://www.sqlite.org/datatype3.html#collation… If that what you need.

The new Text type has a compare method that allows you to specify the locale. Perhaps that would work better for you?

http://xojo.helpdocsonline.com/text$Compare

Paul, that is what I’m looking for ( already a long time ago).

I understand this type is available with last version, mmm … will have to update

[quote=158056:@Paul Lefebvre]The new Text type has a compare method that allows you to specify the locale. Perhaps that would work better for you?

http://xojo.helpdocsonline.com/text$Compare[/quote]

But is this supported for windows yet ?

Yes.

The Text data type is available for all project types. More information on what else is available for all project types in 2014r3 is here:

http://www.xojo.com/blog/en/2014/12/new-language-features.php