Let's access emoji like Enum and print it easily. 😎
- Java
System.out.printf("Damn it! Who writes these shit %s%s%s%n",Emoji.PILE_OF_POO,Emoji.PILE_OF_POO,Emoji.PILE_OF_POO);
- Kotlin
println("Damn it! Who writes these shit ${Emoji.PILE_OF_POO}${Emoji.PILE_OF_POO}${Emoji.PILE_OF_POO}")
- For Maven
<project>
...
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.PureFuncInc</groupId>
<artifactId>emoji-jvm-string</artifactId>
<version>$version</version>
</dependency>
</dependencies>
...
</project>
- For Gradle Groovy
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
implementation "com.github.PureFuncInc:emoji-jvm-string:$version"
}
- For Kotlin Gradle DSL
repositories {
maven {
url = uri("https://jitpack.io")
}
}
dependencies {
implementation("com.github.PureFuncInc:emoji-jvm-string:$version")
}
Q: Why not just one Emoji class?
All enum in one .kt will exceed jvm limit 64K.