Improved readability and brevity of hasEmojiTerminal.

This commit is contained in:
Clinton Alexander 2016-06-17 11:44:40 +01:00 committed by Andras Slemmer
parent 5858ff5c45
commit 9d4f75f241

View File

@ -4,7 +4,7 @@ package com.r3corda.core.utilities
* A simple wrapper class that contains icons and support for printing them only when we're connected to a terminal. * A simple wrapper class that contains icons and support for printing them only when we're connected to a terminal.
*/ */
object Emoji { object Emoji {
val hasEmojiTerminal by lazy { System.getenv("TERM") != null && (System.getenv("LANG") != null) && System.getenv("LANG").contains("UTF-8") } val hasEmojiTerminal by lazy { System.getenv("TERM") != null && (System.getenv("LANG")?.contains("UTF-8") == true) }
const val CODE_DIAMOND = "\ud83d\udd37" const val CODE_DIAMOND = "\ud83d\udd37"
const val CODE_BAG_OF_CASH = "\ud83d\udcb0" const val CODE_BAG_OF_CASH = "\ud83d\udcb0"