Does String.Length use Count or zero-based

I just noticed my new code which reports string length is giving me zero-based or indexed count.
abcdefghij in 2021r2.1 is reporting as 9 but in previous versions it 10

I didn’t notice until I went back from the current to previous versions and was very perplexed.

I also checked in search of my code and it has Str.Length - 1

The Length, like a count, is not an index, so it will never be zero-based.

Also I can’t reproduce your results as I get 10 for that string.

Cleaned Cache and it was correct

1 Like