Last updated:
0 purchases
gurmukhi utils
Gurmukhi Utils (Dart) #
Dart library for converting, analyzing, and testing Gurmukhi strings.
SantLipi extensions are supported.
Gurmukhi String Extensions #
Remove Vishraams #
'ਸਭਨਾ ਜੀਆ ਕਾ, ਇਕੁ ਦਾਤਾ; ਸੋ. ਮੈ ਵਿਸਰਿ ਨ ਜਾਈ ॥੫॥'.removeVishraams();
// 'ਸਭਨਾ ਜੀਆ ਕਾ ਇਕੁ ਦਾਤਾ ਸੋ ਮੈ ਵਿਸਰਿ ਨ ਜਾਈ ॥੫॥'
copied to clipboard
First Letters #
'ਜਿਸਨੋ ਕ੍ਰਿਪਾ ਕਰਹਿ ਤਿਨਿ ਨਾਮ ਰਤਨੁ ਪਾਇਆ ॥'.firstGurmukhiLetters();
// ['ਜ', 'ਕ', 'ਕ', 'ਤ', 'ਨ', 'ਰ', 'ਪ']
copied to clipboard
Split #
'ਕੈਸੀ ਆਰਤੀ ਹੋਇ ॥'.splitGurmukhi();
// ['ਕੈ', 'ਸੀ', ' ', 'ਆ', 'ਰ', 'ਤੀ', ' ', 'ਹੋ', 'ਇ', ' ', '॥']
copied to clipboard
Characters joined by Virama ੍ can be split as:
'ਅੰਮ੍ਰਿਤ'.splitGurmukhi();
// ['ਅੰ', 'ਮ੍ਰਿ', 'ਤ']
copied to clipboard
'ਅੰਮ੍ਰਿਤ'.splitGurmukhi(splitVirama: true);
// ['ਅੰ', 'ਮ੍', 'ਰਿ', 'ਤ']
copied to clipboard
Support SantLipi modifiers:
'ਸ꠴ਯਾਮ'.splitGurmukhi(extensions: true);
// ['ਸ', '꠴ਯਾ', 'ਮ']
copied to clipboard
Unicode Normalization #
Fix Matras of ੳ, ਅ, and ੲ:
'ਅਾਦਿ'.normalizeGurmukhi();
// ਆਦਿ
copied to clipboard
Fix Order of Diacritics:
'ਕੰੁਚਰ'.normalizeGurmukhi();
// ਕੁੰਚਰ
copied to clipboard
Remove Sant Lipi Modifiers if extensions is not enabled:
'ਮਧ꠳ਯ'.normalizeGurmukhi();
// ਮਧ੍ਯ
copied to clipboard
Conversion #
Number to Gurmukhi #
123.toGurmukhi();
// ੧੨੩
copied to clipboard
Ascii to Gurmukhi #
Gurmukhi Text encoded in Ascii fonts (See fonts by Dr Kulbir Thind):
asciiToGurmukhi('goibMd imlx kI ieh qyrI brIAw ]');
// ਗੋਬਿੰਦ ਮਿਲਣ ਕੀ ਇਹ ਤੇਰੀ ਬਰੀਆ ॥
copied to clipboard
Support SantLipi modifiers (See Ascii Font OpenGurbaniAkhar):
asciiToGurmukhi('qRsîo', extensions: true);
// ਤ੍ਰਸ꠵ਯੋ
copied to clipboard
Contribute #
If you want to help, please get started with the CONTRIBUTING.md doc
Related #
Gurmukhi Utils comes in many programming languages. Use the Gurmukhi Utils library in another language.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.