Write-InEmojis
Writes text in Emojis
param([string]$text = "")
try {
if ($text -eq "") { $text = Read-Host "Enter the text" }
$table = Import-CSV "$PSScriptRoot/data/emojis.csv"
foreach($row in $table) {
$text = $text -Replace "\s?$($row.WORD)\s?","$($row.EMOJI)?"
}
Write-Output $text
exit 0 # success
} catch {
"?? ERROR: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))"
exit 1
}Specifies the text