Type: Posts; User: helloworld922
yes, that's correct (try it yourself and see).
Read the documentation for the substring method. The end index is not included in the resultant substring.