Index and length must refer to a location within the string. Parameter name: length.这是什么意思?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 11:39:06
Index and length must refer to a location within the string. Parameter name: length.这是什么意思?

Index and length must refer to a location within the string. Parameter name: length.这是什么意思?
Index and length must refer to a location within the string. Parameter name: length.这是什么意思?

Index and length must refer to a location within the string. Parameter name: length.这是什么意思?
索引值和长度值必须指向字符串内.
就是说,你的索引值不能超出字符串的长度.
比如说,字符串长度是5,那么索引值只能取0-4.