Files
NetUnicodeInfo/UnicodeCharacterInspector/StringToUtf32Converter.cs
T

27 lines
656 B
C#
Raw Normal View History

2014-11-24 20:09:59 +01:00
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace UnicodeCharacterInspector
{
internal class StringToUtf32Converter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string text = value as string;
if (!string.IsNullOrEmpty(text)) return char.ConvertToUtf32(text, 0);
else return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}