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

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 06:21:57
Indexandlengthmustrefertoalocationwithinthestring.Parametername:length.这是什么意思?Indexandlengthmustrefe

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.