1
+ package com.flixclusive.feature.mobile.update.util
2
+
3
+ private val GITMOJIS : Map <String , String > = mapOf (
4
+ " :art:" to " 🎨" ,
5
+ " :zap:" to " ⚡️" ,
6
+ " :fire:" to " 🔥" ,
7
+ " :bug:" to " 🐛" ,
8
+ " :ambulance:" to " 🚑️" ,
9
+ " :sparkles:" to " ✨" ,
10
+ " :memo:" to " 📝" ,
11
+ " :rocket:" to " 🚀" ,
12
+ " :lipstick:" to " 💄" ,
13
+ " :tada:" to " 🎉" ,
14
+ " :white_check_mark:" to " ✅" ,
15
+ " :lock:" to " 🔒️" ,
16
+ " :closed_lock_with_key:" to " 🔐" ,
17
+ " :bookmark:" to " 🔖" ,
18
+ " :rotating_light:" to " 🚨" ,
19
+ " :construction:" to " 🚧" ,
20
+ " :green_heart:" to " 💚" ,
21
+ " :arrow_down:" to " ⬇️" ,
22
+ " :arrow_up:" to " ⬆️" ,
23
+ " :pushpin:" to " 📌" ,
24
+ " :construction_worker:" to " 👷" ,
25
+ " :chart_with_upwards_trend:" to " 📈" ,
26
+ " :recycle:" to " ♻️" ,
27
+ " :heavy_plus_sign:" to " ➕" ,
28
+ " :heavy_minus_sign:" to " ➖" ,
29
+ " :wrench:" to " 🔧" ,
30
+ " :hammer:" to " 🔨" ,
31
+ " :globe_with_meridians:" to " 🌐" ,
32
+ " :pencil2:" to " ✏️" ,
33
+ " :pencil:" to " ✏️" ,
34
+ " :poop:" to " 💩" ,
35
+ " :rewind:" to " ⏪️" ,
36
+ " :twisted_rightwards_arrows:" to " 🔀" ,
37
+ " :package:" to " 📦️" ,
38
+ " :alien:" to " 👽️" ,
39
+ " :truck:" to " 🚚" ,
40
+ " :page_facing_up:" to " 📄" ,
41
+ " :boom:" to " 💥" ,
42
+ " :bento:" to " 🍱" ,
43
+ " :wheelchair:" to " ♿️" ,
44
+ " :bulb:" to " 💡" ,
45
+ " :beers:" to " 🍻" ,
46
+ " :speech_balloon:" to " 💬" ,
47
+ " :card_file_box:" to " 🗃️" ,
48
+ " :loud_sound:" to " 🔊" ,
49
+ " :mute:" to " 🔇" ,
50
+ " :busts_in_silhouette:" to " 👥" ,
51
+ " :children_crossing:" to " 🚸" ,
52
+ " :building_construction:" to " 🏗️" ,
53
+ " :iphone:" to " 📱" ,
54
+ " :clown_face:" to " 🤡" ,
55
+ " :egg:" to " 🥚" ,
56
+ " :see_no_evil:" to " 🙈" ,
57
+ " :camera_flash:" to " 📸" ,
58
+ " :alembic:" to " ⚗️" ,
59
+ " :mag:" to " 🔍️" ,
60
+ " :label:" to " 🏷️" ,
61
+ " :seedling:" to " 🌱" ,
62
+ " :triangular_flag_on_post:" to " 🚩" ,
63
+ " :goal_net:" to " 🥅" ,
64
+ " :dizzy:" to " 💫" ,
65
+ " :wastebasket:" to " 🗑️" ,
66
+ " :passport_control:" to " 🛂" ,
67
+ " :adhesive_bandage:" to " 🩹" ,
68
+ " :monocle_face:" to " 🧐" ,
69
+ " :coffin:" to " ⚰️" ,
70
+ " :test_tube:" to " 🧪" ,
71
+ " :necktie:" to " 👔" ,
72
+ " :stethoscope:" to " 🩺" ,
73
+ " :bricks:" to " 🧱" ,
74
+ " :technologist:" to " 🧑💻" ,
75
+ " :money_with_wings:" to " 💸" ,
76
+ " :thread:" to " 🧵" ,
77
+ " :safety_vest:" to " 🦺"
78
+ )
79
+
80
+ internal fun String.fromGitmoji (): String {
81
+ val re = Regex (GITMOJIS .keys.joinToString(" |" ), RegexOption .IGNORE_CASE )
82
+ return re.replace(this ) { matchResult ->
83
+ GITMOJIS [matchResult.value.lowercase()] ? : " "
84
+ }.trim()
85
+ }
0 commit comments