C# codepublic class Utility
{
private Utility() { }
/// <summary>
/// 安全的字符串
/// </summary>
public static string InputText(string text, int maxLength)
{
text = text.Trim();
if (string.IsNullOrEmpty(text))
return string.Empty;
if (text.Length > maxLength)
text = text.Substring(0, maxLength);
text …
C# codepublic class Utility
{
private Utility() { }
/// <summary>
/// 安全的字符串
/// </summary>
public static string InputText(string text, int maxLength)
{
text = text.Trim();
if (string.IsNullOrEmpty(text))
return string.Empty;
if (text.Length > maxLength)
text = text.Substring(0, maxLength);
text …