1
0
mirror of https://github.com/BDDSM/YY.EventLogReaderAssistant.git synced 2024-11-21 10:05:51 +02:00

Добавил дополнительные методы преобразования строк в числа

This commit is contained in:
YPermitin 2020-04-11 13:14:13 +05:00
parent d0d7944f00
commit ad5155067e

View File

@ -29,6 +29,21 @@ namespace YY.EventLogAssistant.Services
return functionReturnValue;
}
public static string RemoveBraces(this string sourceString)
{
return sourceString.Replace("}", "").Replace("{", "");
}
public static int ToInt32(this string sourceString)
{
return Convert.ToInt32(sourceString);
}
public static long ToInt64(this string sourceString)
{
return Convert.ToInt64(sourceString);
}
public static string ConvertEncoding(this string s, Encoding source, Encoding result)
{
byte[] souceBytes = source.GetBytes(s);