using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// stringdo 的摘要说明
/// </summary>
public class stringdo
{
	public stringdo()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}

    /// <summary>
    ///字符串截取
    /// </summary>
    public string CutString(string str, int length)
    {
        string newString = "";
        if (str != "")
        {
            if (str.Length > length)
            {
                newString = str.Substring(0, length) + "...";
            }
            else
            {
                newString = str;
            }
        }
        return newString;
    }

    /// <summary>
    ///短日期处理
    /// </summary>
    public string short_time(object times)
    {
        DateTime shorttime = Convert.ToDateTime(times);
        return shorttime.ToShortDateString();
    }
}
