This method provides an opportunity to replace symbols in latin text by corresponding Unicode Emoticons
Method supports replacement of following combinations of symbols
- :) or :-) to 😊
- :( or :-( to ☹
- -> or :--> to ☛
- <- or :<-- to ☚
- => or :==> to ➨
- ...
Just add This extension method to Your class or use it like class lybrary, and call method ReplaceEmoticons() in any string. If You are using method in console application You need to activate console unicode fonts, see how to do that here
The example of using this method in c# console application is
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter Your Text");
string st = Console.ReadLine();
Console.WriteLine(new string('-', 30));
Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.WriteLine(st.ConvertEmoticons());
Console.ReadKey();
}
}
My another project for converting latin letters to armenian
Smart converter
This project written on C# 6.0, .NET Framework 4.6 Visual Studio 2015 Comunity Edition