package com.craigvg.lichun_android.utils /** * Interest emoji/formatting helpers * Ported from iOS String+Interest.swift */ /** * Returns an emoji for a given interest string. */ fun String.interestEmoji(): String { val emojiMap = mapOf( "music" to "🎵", "sports" to "🏀", "reading" to "📚", "books" to "📚", "movies" to "🎬", "films" to "🎬", "travel" to "✈️", "traveling" to "✈️", "cooking" to "🍳", "gaming" to "🎮", "games" to "🎮", "art" to "🎨", "painting" to "🎨", "fitness" to "💪", "gym" to "💪", "technology" to "💻", "tech" to "💻", "photography" to "📷", "photos" to "📷", "dancing" to "💃", "dance" to "💃", "hiking" to "🥾", "nature" to "🌿", "outdoors" to "🌲", "writing" to "✍️", "yoga" to "🧘", "meditation" to "🧘", "coffee" to "☕", "food" to "🍽️", "shopping" to "🛒", "fashion" to "👗", "pets" to "🐾", "animals" to "🐾", "science" to "🔬", "astronomy" to "🌙", "cars" to "🚗", "cycling" to "🚲" ) return emojiMap[this.lowercase()] ?: "⭐" } /** * Format interest string with emoji prefix. */ fun String.interestWithEmoji(): String { return "${this.interestEmoji()} ${this.replaceFirstChar { it.uppercase() }}" } /** * Format list of interests with emojis. */ fun List.formatInterests(): String { return joinToString(" ") { it.interestWithEmoji() } }