简体   繁体   English

排序 dart 和 flutter 的波斯字符串列表

[英]sort a list of persian Strings for dart and flutter

i want to sort a list of persian Strings for dart and flutter.我想对 dart 和 flutter 的波斯字符串列表进行排序。 i alerady use list.(a.toLowerCase()).compareTo(b.toLowerCase()));我已经使用 list.(a.toLowerCase()).compareTo(b.toLowerCase())); but it does not work for persian.但它不适用于波斯语。

Dart doesn't have this built-in to the VM, or in the Intl package, and the collation tables are quite large. Dart 在 VM 或 Intl package 中没有内置此功能,并且排序规则表非常大。 So unfortunately I think your only approach right now is to hook up to the native operating system capabilities.所以不幸的是,我认为您现在唯一的方法是连接到本机操作系统功能。 Or if you only need a single language you could probably manage to import data from ICU/CLDR for that one and it wouldn't be too expensive.或者,如果您只需要一种语言,您可能会设法从 ICU/CLDR 导入该语言的数据,而且成本不会太高。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM