Skip to content

This method provides an opportunity to replace symbols in latin text by corresponding Unicode Emoticons

Notifications You must be signed in to change notification settings

tigranv/Replacing_Symbols_In-Text-By-Emoticons_extension_method

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Replacing Symbols By Emoticons (ext. method)

This method provides an opportunity to replace symbols in latin text by corresponding Unicode Emoticons

emoticonsext

Method supports replacement of following combinations of symbols

  • :) or :-) to 😊
  • :( or :-( to ☹
  • -> or :--> to ☛
  • <- or :<-- to ☚
  • => or :==> to ➨
  • ...

How To Use

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();
    }
}

See Also

My another project for converting latin letters to armenian

Smart converter

lattoarmtrans

lattoarm

This project written on C# 6.0, .NET Framework 4.6 Visual Studio 2015 Comunity Edition

About

This method provides an opportunity to replace symbols in latin text by corresponding Unicode Emoticons

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages