StringHelperGetSqlText Method | Helper帮助文档 |
截取文本,区分中英文字符,中文算两个长度,英文算一个长度,用于数据库存储
Namespace: HD.Common
Assembly: HD.Common (in HD.Common.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static string GetSqlText( string str, int length )
Public Shared Function GetSqlText ( str As String, length As Integer ) As String
public: static String^ GetSqlText( String^ str, int length )
static member GetSqlText : str : string * length : int -> string
Parameters
- str
- Type: SystemString
待截取的字符串 - length
- Type: SystemInt32
需计算长度的字符串
Return Value
Type: Stringstring
See Also