取得传入字符串中指定多字节长度的字符串
Namespace: AdfAssembly: Adf (in Adf.dll) Version: 4.1.5549.27750
Syntax public static string Sub(
string input,
int len,
string append = null
)
Public Shared Function Sub (
input As String,
len As Integer,
Optional append As String = Nothing
) As String
public:
static String^ Sub(
String^ input,
int len,
String^ append = nullptr
)
static member Sub :
input : string *
len : int *
?append : string
(* Defaults:
let _append = defaultArg append null
*)
-> string
Parameters
- input
- Type: SystemString
要进行截取的字符串 - len
- Type: SystemInt32
字符长度,多字节字符按2个字符计算 - append (Optional)
- Type: SystemString
须在其尾增加的字符串,当为Null或Empty时则不进行添加
Return Value
Type:
String返回截取后的字符串
Examples 一个中文按两个单位计算
See Also