Open
Description
Description
String Object:
len is of type unsigned int.
method that apply to position into the String or its size are expecting an unsigned int, this is the case with:
charAt()
substring()
remove()
reserve()
Oddly, indexOf() and lastIndexOf() are returning int and not unsigned int
Current behavior
Oddly, indexOf() and lastIndexOf() are returning int and not unsigned int
Expected behavior
indexOf() and lastIndexOf() ought to return unsigned int, to avoid unnecessary casting from int to unsigned int
Additional information
It's frequent to pass the result of indexOf() to substring()
Thanks