jijihohococo/myanmar-alphabet-sorting
最新稳定版本:v3.1
Composer 安装命令:
composer require jijihohococo/myanmar-alphabet-sorting
包简介
Myanmar Alphabet Sorting for PHP
README 文档
README
This library is aimed to sort Myanmar Alphabets (both Unicode and Zawgyi Code) Array in PHP
License
This package is Open Source According to MIT license
Installing Library Via Composer
Firstly, you need to add some data in your repositories of composer.json as shown as below
"repositories": [ { "name": "jijihohococo/myanmar-alphabet-sorting", "type": "vcs", "url": "git@github.com:jijihohococo/myanmar-alphabet-sorting.git" } ],
And then, run below code in command line.
composer require jijihohococo/myanmar-alphabet-sorting
Usage
You can sort Myanmar Alphabets like below in ascending order
use JiJiHoHoCoCo\MyanmarAlphabetSorting\Sorting; $array = [ "က", "ကား", "ကိ", "ကီ", "ကေ", "ကု", "ကူ", "ကူး", "ကာ"]; Sorting::ascendingOrder($array);
You can sort Myanmar Alphabets like below in descending order
Sorting::descendingOrder($array);
You can sort Myanmar Alphabets by field name in multi dimensional array with both ascending and descending order.
$multiDimensionalArray = [ ['name'=>'ကေကေ',"age"=>'12'], ['name'=>'ကီကီ','age'=>'14'], ['name'=>'ကူးကူး','age'=>'13'] ]; Sorting::ascendingMulti($multiDimensionalArray,'name'); Sorting::descendingMulti($multiDimensionalArray,'name');
You can also sort Myanmar Alphabets by field name which might include duplicated value sometimes in multi dimensional array with both ascending and descending order.
$duplicatedMultiDimensionalArray = [ ['name'=>'ကေကေ',"age"=>'12'], ['name'=>'ကီကီ','age'=>'14'], ['name'=>'ကူးကူး','age'=>'13'], ['name'=>'ကီကီ','age'=>'20'] ]; Sorting::ascendingMulti($duplicatedMultiDimensionalArray,'name'); Sorting::descendingMulti($duplicatedMultiDimensionalArray,'name');
References
https://mcf.org.mm/myanmar-unicode/411-myanmar-code-chart.html
https://jrgraphix.net/r/Unicode/1000-109F
https://unicode.org/charts/PDF/UAA60.pdf
Hope you enjoy!
统计信息
- 总下载量: 273
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-14