using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace skyscraper5.Data.PostgreSql { internal static class StringExtensions { public static string TrimJunk(this string str) { if (str == null) return null; str = str.Trim('\0'); if (!str.Contains("\0")) return str; string iris = ""; foreach(char c in str) { if (c == 0) break; iris += c; } return iris; } } }