Coder Social home page Coder Social logo

myanmar-alphabet-sorting's Introduction

Myanmar Alphabet Sorting for PHP

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": "[email protected]: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://my.wiktionary.org/wiki/%E1%80%9D%E1%80%85%E1%80%BA%E1%80%9B%E1%80%BE%E1%80%84%E1%80%BA%E1%80%94%E1%80%9B%E1%80%AE:%E1%80%9E%E1%80%90%E1%80%BA%E1%80%95%E1%80%AF%E1%80%B6

https://unicode.org/charts/PDF/UAA60.pdf

https://my.wikipedia.org/wiki/%E1%80%9D%E1%80%AE%E1%80%80%E1%80%AE%E1%80%95%E1%80%AE%E1%80%B8%E1%80%92%E1%80%AE%E1%80%B8%E1%80%9A%E1%80%AC%E1%80%B8:Font

Hope you enjoy!

myanmar-alphabet-sorting's People

Contributors

suzume98 avatar

Watchers

Lin Aung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.