点击或拖拽改变大小

HslExtensionRemoveLast 方法 (String, Int32)

移除指定字符串数据的最后 length 个字符。如果字符串本身的长度不足 length,则返回为空字符串。
Remove the last "length" characters of the specified string data. If the length of the string itself is less than length, an empty string is returned.

命名空间:  HslCommunication
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public static string RemoveLast(
	this string value,
	int length
)

参数

value
类型:SystemString
等待操作的字符串数据
length
类型:SystemInt32
准备移除的长度信息

返回值

类型:String
移除之后的数据信息

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型 String 的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。
参见