StringHelperToCutString Method (String, Int32, Boolean) |
字符长度控制 中文 英文识别,一个汉字作为2个字符长度处理
Namespace: X3Platform.UtilAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static string ToCutString(
string text,
int length,
bool hasEllipsis
)
public:
static String^ ToCutString(
String^ text,
int length,
bool hasEllipsis
)
Parameters
- text
- Type: SystemString
要进行切割的字符串 - length
- Type: SystemInt32
返回的长度(自动识别中英文) - hasEllipsis
- Type: SystemBoolean
是否输出省略号
Return Value
Type:
String[Missing <returns> documentation for "M:X3Platform.Util.StringHelper.ToCutString(System.String,System.Int32,System.Boolean)"]
See Also